- Bugfix: when create a Queue object, can't create binding with Exchange object.

This commit is contained in:
cha.messics 2017-07-17 16:28:19 +08:00
parent 09bd23bbd8
commit 1fa7976e4f
1 changed files with 4 additions and 1 deletions

View File

@ -619,7 +619,10 @@ class Queue(MaybeChannelBound):
for B in self.bindings:
channel = channel or self.channel
B.declare(channel)
B.bind(self, nowait=nowait, channel=channel)
if(isinstance(B, Exchange)):
B.bind(channel)
else:
B.bind(self, nowait=nowait, channel=channel)
def queue_declare(self, nowait=False, passive=False, channel=None):
"""Declare queue on the server.