From 501669fed332ce218711fe5fb97ba2256340a3cb Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 18 Jan 2011 21:39:56 +0100 Subject: [PATCH] amqplib: Set connection.client --- kombu/simple.py | 2 +- kombu/transport/pyamqplib.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kombu/simple.py b/kombu/simple.py index dbbaa2de..c4602d4f 100644 --- a/kombu/simple.py +++ b/kombu/simple.py @@ -32,7 +32,7 @@ class SimpleBase(object): self.buffer = deque() self.consumer.register_callback(self._receive) - def get(self, block=True, timeout=None, sync=False): + def get(self, block=True, timeout=None): if not block: return self.get_nowait() self._consume() diff --git a/kombu/transport/pyamqplib.py b/kombu/transport/pyamqplib.py index a5f09706..80e4e577 100644 --- a/kombu/transport/pyamqplib.py +++ b/kombu/transport/pyamqplib.py @@ -210,13 +210,15 @@ class Transport(base.Transport): raise KeyError("Missing password for AMQP connection.") if not conninfo.port: conninfo.port = self.default_port - return self.Connection(host=conninfo.host, + conn = self.Connection(host=conninfo.host, userid=conninfo.userid, password=conninfo.password, virtual_host=conninfo.virtual_host, insist=conninfo.insist, ssl=conninfo.ssl, connect_timeout=conninfo.connect_timeout) + conn.client = self.client + return conn def close_connection(self, connection): """Close the AMQP broker connection."""