diff options
author | Ask Solem <ask@celeryproject.org> | 2011-11-30 12:57:10 +0000 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2011-11-30 12:57:10 +0000 |
commit | 2de2666c98d7b3cae3c7db121c3ec1e5bbaead77 (patch) | |
tree | 9e9bba0a3f836329d5f1d5cdb427c8c2cbf1d86b /kombu/compat.py | |
parent | 2c459e4c8c63995a56e429ae767166147237fd76 (diff) | |
download | kombu-2de2666c98d7b3cae3c7db121c3ec1e5bbaead77.tar.gz |
Fixes issue with kombu.compat. Closes #83
Diffstat (limited to 'kombu/compat.py')
-rw-r--r-- | kombu/compat.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kombu/compat.py b/kombu/compat.py index ef73c3d7..ad0e1eb4 100644 --- a/kombu/compat.py +++ b/kombu/compat.py @@ -32,13 +32,12 @@ class Publisher(messaging.Producer): durable = True auto_delete = False _closed = False - _provided_channel = False def __init__(self, connection, exchange=None, routing_key=None, exchange_type=None, durable=None, auto_delete=None, channel=None, **kwargs): if channel: - connection, self._provided_channel = channel, True + connection = channel self.exchange = exchange or self.exchange self.exchange_type = exchange_type or self.exchange_type @@ -61,8 +60,6 @@ class Publisher(messaging.Producer): return self.publish(*args, **kwargs) def close(self): - if self.channel is not None and not self._provided_channel: - self.channel.close() super(Publisher, self).close() self._closed = True |