summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/resolver.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-10 14:08:33 -0400
committerLance Stout <lancestout@gmail.com>2012-04-10 14:08:33 -0400
commit4cd5d3b3b5668e2b3806f06f5fd328ec5095271d (patch)
tree96b14d706a585adab925674c0c30633286dd08e8 /sleekxmpp/xmlstream/resolver.py
parente48e50c6ff39c3243b7056f0f08e2f405216531b (diff)
downloadslixmpp-4cd5d3b3b5668e2b3806f06f5fd328ec5095271d.tar.gz
slixmpp-4cd5d3b3b5668e2b3806f06f5fd328ec5095271d.tar.bz2
slixmpp-4cd5d3b3b5668e2b3806f06f5fd328ec5095271d.tar.xz
slixmpp-4cd5d3b3b5668e2b3806f06f5fd328ec5095271d.zip
Fix DNS resolution results for IP literals.
Diffstat (limited to 'sleekxmpp/xmlstream/resolver.py')
-rw-r--r--sleekxmpp/xmlstream/resolver.py4
1 files changed, 2 insertions, 2 deletions
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