Merge pull request #77 from zever/timeout-none

allow for timeout to be None in SimpleConsumer.get_messages
This commit is contained in:
David Arthur
2013-12-13 07:10:51 -08:00

View File

@@ -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: