diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-08-20 16:15:52 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-08-20 16:15:52 -0700 |
commit | 047596ad1767e21703994ac760c10eef9e8d1baa (patch) | |
tree | 79374ba37d15e8f4830174a9cf53f4dbdc5e8fe2 /kafka | |
parent | e5c64874b4692a6c1b7193691656f88954709a0d (diff) | |
download | kafka-python-sensor_quota_message.tar.gz |
Fix quota violation exception messagesensor_quota_message
Diffstat (limited to 'kafka')
-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): """ |