diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-08-20 17:39:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-20 17:39:26 -0700 |
commit | 7d31aa397841f1a0e4d86799c3d0fe4ca4ba9290 (patch) | |
tree | 41b967f80c401a5875ae045fddcca56e738d4ca0 | |
parent | 754ff8954e2ab149cfa2b79cd21c85b84602e7c8 (diff) | |
download | kafka-python-7d31aa397841f1a0e4d86799c3d0fe4ca4ba9290.tar.gz |
Fix quota violation exception message (#809)
-rw-r--r-- | kafka/metrics/stats/sensor.py | 8 |
1 files changed, 4 insertions, 4 deletions
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): """ |