diff options
author | Ask Solem <ask@celeryproject.org> | 2016-04-13 12:13:25 -0700 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2016-04-13 12:13:25 -0700 |
commit | 8344d7476096295685efa5ef4e365fde3425f6ee (patch) | |
tree | a16c6a3a0802d30eb2cc71dddd9974c045522946 | |
parent | f154beea903687889194377b466fc019dad45c83 (diff) | |
download | py-amqp-8344d7476096295685efa5ef4e365fde3425f6ee.tar.gz |
Fixes Py2 bytes problem in Connection._x_close_ok
-rw-r--r-- | amqp/abstract_channel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/amqp/abstract_channel.py b/amqp/abstract_channel.py index 74e74d1..b12eeec 100644 --- a/amqp/abstract_channel.py +++ b/amqp/abstract_channel.py @@ -19,6 +19,7 @@ from __future__ import absolute_import, unicode_literals from vine import ensure_promise, promise from .exceptions import AMQPNotImplementedError, RecoverableConnectionError +from .five import bytes_if_py2 from .serialization import dumps, loads __all__ = ['AbstractChannel'] @@ -56,7 +57,7 @@ class AbstractChannel(object): conn = self.connection if conn is None: raise RecoverableConnectionError('connection already closed') - args = dumps(format, args) if format else '' + args = dumps(format, args) if format else bytes_if_py2('') try: conn._frame_writer.send((1, self.channel_id, sig, args, content)) except StopIteration: |