From ad91a8cd5ebff56ee0cb84edbc7f0574e9c19911 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 8 Jun 2014 19:51:57 -0700 Subject: Bring back use of dnspython for A/AAAA resolution. This is behind a use_dnspython flag, however, so it can be disabled as desired. --- sleekxmpp/xmlstream/xmlstream.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream/xmlstream.py') 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. -- cgit v1.2.3