From 4cd5d3b3b5668e2b3806f06f5fd328ec5095271d Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 10 Apr 2012 14:08:33 -0400 Subject: Fix DNS resolution results for IP literals. --- sleekxmpp/xmlstream/resolver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/resolver.py b/sleekxmpp/xmlstream/resolver.py index db97f5fb..3c3896a3 100644 --- a/sleekxmpp/xmlstream/resolver.py +++ b/sleekxmpp/xmlstream/resolver.py @@ -94,14 +94,14 @@ def resolve(host, port=None, service=None, proto='tcp', resolver=None): try: # If `host` is an IPv4 literal, we can return it immediately. ipv4 = socket.inet_pton(socket.AF_INET, host) - yield [(host, port)] + yield (host, port) except socket.error: pass try: # Likewise, If `host` is an IPv6 literal, we can return it immediately. ipv6 = socket.inet_pton(socket.AF_INET6, host) - yield [(host, port)] + yield (host, port) except socket.error: pass -- cgit v1.2.3