Skip to content

Commit

Permalink
Simplify the queue bind function for Twisted
Browse files Browse the repository at this point in the history
Pass everything as kwargs.

Signed-off-by: Jeremy Cline <[email protected]>
  • Loading branch information
jeremycline committed Oct 10, 2018
1 parent 5569f62 commit c440a2f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fedora_messaging/twisted/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,8 @@ def bind_queues(self, bindings):
channel = yield self._allocate_channel()
try:
for binding in bindings:
b = binding.copy()
try:
queue = b.pop("queue")
exchange = b.pop("exchange")
yield channel.queue_bind(queue=queue, exchange=exchange, **b)
yield channel.queue_bind(**binding)
except pika.exceptions.ChannelClosed as e:
raise BadDeclaration("binding", binding, e)
finally:
Expand Down

0 comments on commit c440a2f

Please sign in to comment.