From 61806851a03b7cb85bf974046a01bbc97b7807e1 Mon Sep 17 00:00:00 2001 From: Dane Guempel Date: Fri, 7 Dec 2012 20:28:24 -0600 Subject: [PATCH] Changing the _info method of the connection class to respect the alt attribute of the object. fixes #185 --- kombu/connection.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kombu/connection.py b/kombu/connection.py index c4c11ac2..9cc97436 100644 --- a/kombu/connection.py +++ b/kombu/connection.py @@ -517,9 +517,14 @@ class Connection(object): if resolve: transport_cls = RESOLVE_ALIASES.get(transport_cls, transport_cls) D = self.transport.default_connection_params - hostname = self.hostname or D.get('hostname') - if self.uri_prefix: - hostname = '%s+%s' % (self.uri_prefix, hostname) + + if self.alt: + hostname = ";".join(self.alt) + else: + hostname = self.hostname or D.get('hostname') + if self.uri_prefix: + hostname = '%s+%s' % (self.uri_prefix, hostname) + info = (('hostname', hostname), ('userid', self.userid or D.get('userid')), ('password', self.password or D.get('password')),