Skip to content

Commit

Permalink
Virtual now supports passive argument to exchange_declare
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Jun 12, 2012
1 parent 08390fe commit 8d56526
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kombu/transport/virtual/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,15 @@ def __init__(self, connection, **kwargs):
pass

def exchange_declare(self, exchange, type="direct", durable=False,
auto_delete=False, arguments=None, nowait=False):
auto_delete=False, arguments=None, nowait=False, passive=False):
"""Declare exchange."""
if passive:
if exchange not in self.state.exchanges:
raise StdChannelError("404",
u"NOT_FOUND - no exchange %r in vhost %r" % (
exchange, self.connection.client.virtual_host or '/'),
(50, 10), "Channel.exchange_declare")
return
try:
prev = self.state.exchanges[exchange]
if not self.typeof(exchange).equivalent(prev, exchange, type,
Expand Down

0 comments on commit 8d56526

Please sign in to comment.