From 8ebbbd3ac8849d002c7f00adc7371bed55c80840 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Wed, 1 Dec 2010 12:27:31 +0100 Subject: [PATCH] Fixed SimpleQueue.get if there was no timeout specified --- kombu/simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kombu/simple.py b/kombu/simple.py index c0efe254..01ac867e 100644 --- a/kombu/simple.py +++ b/kombu/simple.py @@ -43,12 +43,12 @@ class SimpleBase(object): if self.buffer: return self.buffer.pop() try: - self.channel.connection.client.drain_events( + self.channel.connection.drain_events( timeout=timeout and remaining) except socket.timeout: raise Empty() elapsed += time() - time_start - remaining = timeout - elapsed + remaining = timeout and timeout - elapsed or None def get_nowait(self): m = self.queue.get(no_ack=self.no_ack)