diff options
author | Tom Nichols <tmnichols@gmail.com> | 2010-05-13 14:39:32 -0400 |
---|---|---|
committer | Tom Nichols <tmnichols@gmail.com> | 2010-05-14 11:22:17 -0400 |
commit | de4d611d3053f2c4fb5029ba5214996cf3821e02 (patch) | |
tree | 2cb623effd04f6b54d3f5531467e2e1a2661d523 /sleekxmpp/__init__.py | |
parent | e8d0fc37dc85488676c62a679f026e9068d9c15e (diff) | |
download | slixmpp-de4d611d3053f2c4fb5029ba5214996cf3821e02.tar.gz slixmpp-de4d611d3053f2c4fb5029ba5214996cf3821e02.tar.bz2 slixmpp-de4d611d3053f2c4fb5029ba5214996cf3821e02.tar.xz slixmpp-de4d611d3053f2c4fb5029ba5214996cf3821e02.zip |
fixed SRV query - should use dns.rdatatype.SRV
Diffstat (limited to 'sleekxmpp/__init__.py')
-rw-r--r-- | sleekxmpp/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py index e2cfb1b9..70bf5c43 100644 --- a/sleekxmpp/__init__.py +++ b/sleekxmpp/__init__.py @@ -31,6 +31,7 @@ from . import plugins srvsupport = True try: import dns.resolver + import dns.rdatatype except ImportError: srvsupport = False @@ -96,7 +97,8 @@ class ClientXMPP(basexmpp, XMLStream): else: logging.debug("Since no address is supplied, attempting SRV lookup.") try: - answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.server) + answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.domain, + dns.rdatatype.SRV ) except dns.resolver.NXDOMAIN: logging.debug("No appropriate SRV record found. Using JID server name.") else: |