diff --git a/kombu/transport/pyamqplib.py b/kombu/transport/pyamqplib.py index 12bcd672..cbd35884 100644 --- a/kombu/transport/pyamqplib.py +++ b/kombu/transport/pyamqplib.py @@ -23,13 +23,14 @@ from amqplib.client_0_8.exceptions import AMQPConnectionException from amqplib.client_0_8.exceptions import AMQPChannelException from kombu.transport import base +from kombu.utils.encoding import str_to_bytes DEFAULT_PORT = 5672 # amqplib's handshake mistakenly identifies as protocol version 1191, # this breaks in RabbitMQ tip, which no longer falls back to # 0-8 for unknown ids. -transport.AMQP_PROTOCOL_HEADER = "AMQP\x01\x01\x08\x00" +transport.AMQP_PROTOCOL_HEADER = str_to_bytes("AMQP\x01\x01\x08\x00") class Connection(amqp.Connection): # pragma: no cover