summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2014-06-08 19:51:57 -0700
committerLance Stout <lancestout@gmail.com>2014-06-08 19:51:57 -0700
commitad91a8cd5ebff56ee0cb84edbc7f0574e9c19911 (patch)
tree1876a9e5b507fffd8b772b5057d8fb8ea6bedfe8 /sleekxmpp/xmlstream/xmlstream.py
parent02f79fc94b3c6702dfcc0ce84863ecc744837125 (diff)
downloadslixmpp-ad91a8cd5ebff56ee0cb84edbc7f0574e9c19911.tar.gz
slixmpp-ad91a8cd5ebff56ee0cb84edbc7f0574e9c19911.tar.bz2
slixmpp-ad91a8cd5ebff56ee0cb84edbc7f0574e9c19911.tar.xz
slixmpp-ad91a8cd5ebff56ee0cb84edbc7f0574e9c19911.zip
Bring back use of dnspython for A/AAAA resolution.
This is behind a use_dnspython flag, however, so it can be disabled as desired.
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index bdede5c5..064b52dc 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -224,6 +224,11 @@ class XMLStream(object):
#: If set to ``True``, attempt to use IPv6.
self.use_ipv6 = True
+ #: If set to ``True``, allow using the ``dnspython`` DNS library
+ #: if available. If set to ``False``, the builtin DNS resolver
+ #: will be used, even if ``dnspython`` is installed.
+ self.use_dnspython = True
+
#: Use CDATA for escaping instead of XML entities. Defaults
#: to ``False``.
self.use_cdata = False
@@ -1081,7 +1086,8 @@ class XMLStream(object):
return resolve(domain, port, service=self.dns_service,
resolver=resolver,
- use_ipv6=self.use_ipv6)
+ use_ipv6=self.use_ipv6,
+ use_dnspython=self.use_dnspython)
def pick_dns_answer(self, domain, port=None):
"""Pick a server and port from DNS answers.