summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-01 19:32:12 -0700
committerLance Stout <lancestout@gmail.com>2012-04-01 19:32:12 -0700
commit48504ed5e2ac51402778fce26f64e418f4b9529f (patch)
tree2741ea8f7f46858721472afff6bee46119faa588 /sleekxmpp/xmlstream
parent4d4d1e0ee54d7d0a049635cebc0e90ff1ad186f0 (diff)
downloadslixmpp-48504ed5e2ac51402778fce26f64e418f4b9529f.tar.gz
slixmpp-48504ed5e2ac51402778fce26f64e418f4b9529f.tar.bz2
slixmpp-48504ed5e2ac51402778fce26f64e418f4b9529f.tar.xz
slixmpp-48504ed5e2ac51402778fce26f64e418f4b9529f.zip
Display IPv6 literal addresses in brackets.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 3b0271dc..b14ed5eb 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -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: