Fix for FutureProduceResult.await on python2.6

This commit is contained in:
Dana Powers
2016-03-13 08:48:08 -07:00
parent e42383dd84
commit afce25267d

View File

@@ -25,7 +25,8 @@ class FutureProduceResult(Future):
return ret
def await(self, timeout=None):
return self._latch.wait(timeout)
# wait() on python2.6 returns None instead of the flag value
return self._latch.wait(timeout) or self._latch.is_set()
class FutureRecordMetadata(Future):