From 43511aa7fac950e07376872443db133cbb21530c Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Thu, 7 Dec 2017 15:07:31 -0800 Subject: Minor Exception cleanup --- kafka/metrics/metric_name.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kafka/metrics/metric_name.py') diff --git a/kafka/metrics/metric_name.py b/kafka/metrics/metric_name.py index a475d6c..b5acd16 100644 --- a/kafka/metrics/metric_name.py +++ b/kafka/metrics/metric_name.py @@ -50,9 +50,9 @@ class MetricName(object): tags (dict, optional): Additional key/val attributes of the metric. """ if not (name and group): - raise Exception('name and group must be non-empty.') + raise ValueError('name and group must be non-empty.') if tags is not None and not isinstance(tags, dict): - raise Exception('tags must be a dict if present.') + raise ValueError('tags must be a dict if present.') self._name = name self._group = group -- cgit v1.2.1