From 1fa7976e4fda67331afad40533e2f668f899293a Mon Sep 17 00:00:00 2001 From: "cha.messics" Date: Mon, 17 Jul 2017 16:28:19 +0800 Subject: [PATCH] - Bugfix: when create a Queue object, can't create binding with Exchange object. --- kombu/entity.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kombu/entity.py b/kombu/entity.py index 73697487..a5db8048 100644 --- a/kombu/entity.py +++ b/kombu/entity.py @@ -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.