diff options
author | David Arthur <mumrah@gmail.com> | 2013-12-13 07:10:51 -0800 |
---|---|---|
committer | David Arthur <mumrah@gmail.com> | 2013-12-13 07:10:51 -0800 |
commit | a3066879d2e1cb565ebec2c6cceb2c58521adede (patch) | |
tree | 882e8e9a78801ee8626353f768e9adbb94b33c6e /kafka/consumer.py | |
parent | 67c13f9bcd35edc03ff821c427007b660c1a3384 (diff) | |
parent | 8d26368433dffb65ff8d144203fc59d8162974fe (diff) | |
download | kafka-python-a3066879d2e1cb565ebec2c6cceb2c58521adede.tar.gz |
Merge pull request #77 from zever/timeout-none
allow for timeout to be None in SimpleConsumer.get_messages
Diffstat (limited to 'kafka/consumer.py')
-rw-r--r-- | kafka/consumer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index f2898ad..57b5b97 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -294,7 +294,8 @@ class SimpleConsumer(Consumer): iterator = self.__iter__() # HACK: This splits the timeout between available partitions - timeout = timeout * 1.0 / len(self.offsets) + if timeout: + timeout = timeout * 1.0 / len(self.offsets) with FetchContext(self, block, timeout): while count > 0: |