Skip to content

Commit 5c7cd2f

Browse files
Throw exception on invalid bucket type (#2642)
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 3542e01 commit 5c7cd2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/metrics/stats/percentiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, size_in_bytes, bucketing, max_val, min_val=0.0,
3030
' to be 0.0.')
3131
self.bin_scheme = Histogram.LinearBinScheme(self._buckets, max_val)
3232
else:
33-
ValueError('Unknown bucket type: %s' % (bucketing,))
33+
raise ValueError('Unknown bucket type: %s' % (bucketing,))
3434

3535
def stats(self):
3636
measurables = []

0 commit comments

Comments
 (0)