mirror of https://github.com/celery/kombu.git
AMQP_PROTOCOL_HEADER must be bytes on py3k
This commit is contained in:
parent
f6bb91931f
commit
d0c7b9a2d0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue