From 48504ed5e2ac51402778fce26f64e418f4b9529f Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 1 Apr 2012 19:32:12 -0700 Subject: Display IPv6 literal addresses in brackets. --- sleekxmpp/xmlstream/xmlstream.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3