Merge "Add square brackets for ipv6 based hosts"
This commit is contained in:
commit
37ed443727
@ -478,6 +478,9 @@ class Connection(object):
|
|||||||
hostname, port = netutils.parse_host_port(
|
hostname, port = netutils.parse_host_port(
|
||||||
adr, default_port=5672)
|
adr, default_port=5672)
|
||||||
|
|
||||||
|
if ':' in hostname:
|
||||||
|
hostname = '[' + hostname + ']'
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
'host': '%s:%d' % (hostname, port),
|
'host': '%s:%d' % (hostname, port),
|
||||||
'username': self.conf.qpid_username,
|
'username': self.conf.qpid_username,
|
||||||
|
Loading…
Reference in New Issue
Block a user