Changing the _info method of the connection class to respect the alt attribute of the object. fixes #185

This commit is contained in:
Dane Guempel 2012-12-07 20:28:24 -06:00 committed by Ask Solem
parent bdc1e51f67
commit 61806851a0
1 changed files with 8 additions and 3 deletions

View File

@ -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')),