diff options
author | Lance Stout <lancestout@gmail.com> | 2013-07-29 09:54:40 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2013-07-29 09:54:40 -0700 |
commit | afd48b9e08c1b823c48c35c12c25dd3acadc4dcd (patch) | |
tree | 255fe9993bf884e2eca1f820d6a062f97bbcb4de | |
parent | d439c4f21515813b69f8e39d430cee8ca9a3c946 (diff) | |
parent | 556e4bd74d3536fd951acaa410b89a2e81de7d54 (diff) | |
download | slixmpp-afd48b9e08c1b823c48c35c12c25dd3acadc4dcd.tar.gz slixmpp-afd48b9e08c1b823c48c35c12c25dd3acadc4dcd.tar.bz2 slixmpp-afd48b9e08c1b823c48c35c12c25dd3acadc4dcd.tar.xz slixmpp-afd48b9e08c1b823c48c35c12c25dd3acadc4dcd.zip |
Merge pull request #253 from kxepal/patch-1
Don't resolve AAAA records if there is no dnspython nor IPv6 support
-rw-r--r-- | sleekxmpp/xmlstream/resolver.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/resolver.py b/sleekxmpp/xmlstream/resolver.py index 4cac254c..6f26797f 100644 --- a/sleekxmpp/xmlstream/resolver.py +++ b/sleekxmpp/xmlstream/resolver.py @@ -202,6 +202,9 @@ def get_AAAA(host, resolver=None): # If not using dnspython, attempt lookup using the OS level # getaddrinfo() method. if resolver is None: + if not socket.has_ipv6: + log.debug("Unable to query %s for AAAA records: IPv6 is not supported", host) + return [] try: recs = socket.getaddrinfo(host, None, socket.AF_INET6, socket.SOCK_STREAM) |