diff options
author | Ask Solem <ask@celeryproject.org> | 2013-06-25 13:58:37 +0100 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2013-06-25 13:58:49 +0100 |
commit | e2f72fbb72e68e5d2127c8c028b2c93232de29e4 (patch) | |
tree | b788f31683efe21cf7dc817874cb6e1c7d311c72 | |
parent | 10d4bf53114e6548b9513baa9e2a85a7c3c9976c (diff) | |
download | py-amqp-e2f72fbb72e68e5d2127c8c028b2c93232de29e4.tar.gz |
Fixes Py3 compat problem with amqp.transport. Closes #13
-rw-r--r-- | amqp/transport.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/amqp/transport.py b/amqp/transport.py index 8092c5f..5ad42f0 100644 --- a/amqp/transport.py +++ b/amqp/transport.py @@ -52,6 +52,8 @@ from .exceptions import AMQPError AMQP_PORT = 5672 +EMPTY_BUFFER = bytes() + # Yes, Advanced Message Queuing Protocol Protocol is redundant AMQP_PROTOCOL_HEADER = 'AMQP\x01\x01\x00\x09'.encode('latin_1') @@ -191,7 +193,7 @@ class SSLTransport(_AbstractTransport): as you're asking for, at least with extremely large messages. somewhere > 16K - found this in the test_channel.py test_large unittest.""" - result = '' + result = EMPTY_BUFFER while len(result) < n: try: |