Skip to content

Commit 21d68c9

Browse files
committed
Use TypeError for invalid type
1 parent f0ef99f commit 21d68c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kafka/client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def poll(self, timeout_ms=None, future=None):
545545
elif timeout_ms is None:
546546
timeout_ms = self.config['request_timeout_ms']
547547
elif not isinstance(timeout_ms, (int, float)):
548-
raise RuntimeError('Invalid type for timeout: %s' % type(timeout_ms))
548+
raise TypeError('Invalid type for timeout: %s' % type(timeout_ms))
549549

550550
# Loop for futures, break after first loop if None
551551
responses = []

0 commit comments

Comments
 (0)