Display IPv6 literal addresses in brackets.
This commit is contained in:
parent
4d4d1e0ee5
commit
48504ed5e2
1 changed files with 4 additions and 1 deletions
|
@ -485,7 +485,10 @@ class XMLStream(object):
|
|||
|
||||
try:
|
||||
if not self.use_proxy:
|
||||
log.debug("Connecting to %s:%s", *self.address)
|
||||
domain = self.address[0]
|
||||
if ':' in domain:
|
||||
domain = '[%s]' % domain
|
||||
log.debug("Connecting to %s:%s", domain, self.address[1])
|
||||
self.socket.connect(self.address)
|
||||
|
||||
if self.use_ssl and self.ssl_support:
|
||||
|
|
Loading…
Reference in a new issue