Display IPv6 literal addresses in brackets.

This commit is contained in:
Lance Stout 2012-04-01 19:32:12 -07:00
parent 4d4d1e0ee5
commit 48504ed5e2

View file

@ -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: