mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Fix exceptions for Python3
This commit is contained in:
parent
4ea22ff69b
commit
cd7cd30b4c
2 changed files with 2 additions and 2 deletions
|
@ -145,7 +145,7 @@ class ClientXMPP(BaseXMPP):
|
|||
if DNSPYTHON:
|
||||
try:
|
||||
answers = [((answer.target.to_text()[:-1], answer.port), answer.priority, answer.weight) for answer in dns.resolver.query("_xmpp-client._tcp.%s" % domain, dns.rdatatype.SRV)]
|
||||
except dns.resolver.NXDOMAIN, dns.resolver.NoAnswer:
|
||||
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
|
||||
log.warning("No SRV records for %s" % domain)
|
||||
answers = super(ClientXMPP, self).get_dns_records(domain, port)
|
||||
except dns.exception.Timeout:
|
||||
|
|
|
@ -662,7 +662,7 @@ class XMLStream(object):
|
|||
if DNSPYTHON:
|
||||
try:
|
||||
answers = dns.resolver.query(domain, dns.rdatatype.A)
|
||||
except dns.resolver.NXDOMAIN, dns.resolver.NoAnswer:
|
||||
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
|
||||
log.warning("No A records for %s" % domain)
|
||||
except dns.exception.Timeout:
|
||||
log.warning("DNS resolution timed out for A record of %s" % domain)
|
||||
|
|
Loading…
Reference in a new issue