From 047596ad1767e21703994ac760c10eef9e8d1baa Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 20 Aug 2016 16:15:52 -0700 Subject: Fix quota violation exception message --- kafka/metrics/stats/sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kafka/metrics') diff --git a/kafka/metrics/stats/sensor.py b/kafka/metrics/stats/sensor.py index ca9979b..73a4665 100644 --- a/kafka/metrics/stats/sensor.py +++ b/kafka/metrics/stats/sensor.py @@ -84,11 +84,11 @@ class Sensor(object): if metric.config and metric.config.quota: value = metric.value(time_ms) if not metric.config.quota.is_acceptable(value): - raise QuotaViolationError('(%s) violated quota. Actual: ' - '(%d), Threshold: (%d)' % + raise QuotaViolationError("'%s' violated quota. Actual: " + "%d, Threshold: %d" % (metric.metric_name, - metric.config.quota.bound, - value)) + value, + metric.config.quota.bound)) def add_compound(self, compound_stat, config=None): """ -- cgit v1.2.1