Skip to content

Commit

Permalink
Use TypeError for invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwidman committed Nov 17, 2018
1 parent f0ef99f commit 21d68c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafka/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def poll(self, timeout_ms=None, future=None):
elif timeout_ms is None:
timeout_ms = self.config['request_timeout_ms']
elif not isinstance(timeout_ms, (int, float)):
raise RuntimeError('Invalid type for timeout: %s' % type(timeout_ms))
raise TypeError('Invalid type for timeout: %s' % type(timeout_ms))

# Loop for futures, break after first loop if None
responses = []
Expand Down

0 comments on commit 21d68c9

Please sign in to comment.