Merge "Add square brackets for ipv6 based hosts"

This commit is contained in:
Jenkins 2014-09-09 05:31:35 +00:00 committed by Gerrit Code Review
commit 37ed443727
1 changed files with 3 additions and 0 deletions

View File

@ -478,6 +478,9 @@ class Connection(object):
hostname, port = netutils.parse_host_port(
adr, default_port=5672)
if ':' in hostname:
hostname = '[' + hostname + ']'
params = {
'host': '%s:%d' % (hostname, port),
'username': self.conf.qpid_username,