diff options
author | Ask Solem <ask@celeryproject.org> | 2011-11-27 16:32:19 +0000 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2011-11-27 16:32:19 +0000 |
commit | 16759ac7c1322224646f59df76c5e63fb6468300 (patch) | |
tree | 8549990205994d63c4f40009c6aa5114aa007231 | |
parent | 78dfb865c893108227f4afa7a75901fa4d2f663f (diff) | |
download | kombu-16759ac7c1322224646f59df76c5e63fb6468300.tar.gz |
kombu.compat: Don't close None channel
-rw-r--r-- | kombu/compat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kombu/compat.py b/kombu/compat.py index ac570573..ef73c3d7 100644 --- a/kombu/compat.py +++ b/kombu/compat.py @@ -61,8 +61,9 @@ class Publisher(messaging.Producer): return self.publish(*args, **kwargs) def close(self): - if not self._provided_channel: + if self.channel is not None and not self._provided_channel: self.channel.close() + super(Publisher, self).close() self._closed = True def __enter__(self): |