Add square brackets for ipv6 based hosts

Closes-Bug: #1364837
Change-Id: I8f9702377cc049b74622c2db847ffac3ba946b3a
This commit is contained in:
Davanum Srinivas 2014-09-05 10:49:01 -04:00 committed by Davanum Srinivas (dims)
parent a9ec73f38d
commit ff6c5e95da
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,