Allow all target attributes in client.prepare()

There's really no reason not to - you could have a single client object
invoking methods on a variety of different targets so long as they're
all available via the same transport.
This commit is contained in:
Mark McLoughlin 2013-06-07 12:38:41 +01:00
parent c2c2e17f25
commit 69233f8b65
1 changed files with 7 additions and 3 deletions

View File

@ -132,11 +132,15 @@ class RPCClient(object):
super(RPCClient, self).__init__()
def prepare(self, namespace=None, version=None, server=None,
def prepare(self, exchange=None, topic=None, namespace=None,
version=None, server=None, fanout=None,
timeout=None, check_for_lock=None, version_cap=None):
target = self.target(namespace=namespace,
target = self.target(exchange=exchange,
topic=topic,
namespace=namespace,
version=version,
server=server)
server=server,
fanout=fanout)
if timeout is None:
timeout = self.timeout