mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Fix IPv6 query logging.
This commit is contained in:
parent
1a272fd276
commit
ca5145c210
1 changed files with 4 additions and 4 deletions
|
@ -873,22 +873,22 @@ class XMLStream(object):
|
||||||
v4_answers = [((domain, port), 0, 0)]
|
v4_answers = [((domain, port), 0, 0)]
|
||||||
else:
|
else:
|
||||||
for ans in v4_answers:
|
for ans in v4_answers:
|
||||||
log.debug("Found A record: %s", ans[0])
|
log.debug("Found A record: %s", ans.address)
|
||||||
answers.append(((ans.address, port), 0, 0))
|
answers.append(((ans.address, port), 0, 0))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
log.debug("Querying AAAA records for %s" % domain)
|
log.debug("Querying AAAA records for %s" % domain)
|
||||||
v6_answers = resolver.query(domain, dns.rdatatype.AAAA)
|
v6_answers = resolver.query(domain, dns.rdatatype.AAAA)
|
||||||
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
|
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
|
||||||
log.warning("No A records for %s", domain)
|
log.warning("No AAAA records for %s", domain)
|
||||||
v6_answers = [((domain, port), 0, 0)]
|
v6_answers = [((domain, port), 0, 0)]
|
||||||
except dns.exception.Timeout:
|
except dns.exception.Timeout:
|
||||||
log.warning("DNS resolution timed out " + \
|
log.warning("DNS resolution timed out " + \
|
||||||
"for A record of %s", domain)
|
"for AAAA record of %s", domain)
|
||||||
v6_answers = [((domain, port), 0, 0)]
|
v6_answers = [((domain, port), 0, 0)]
|
||||||
else:
|
else:
|
||||||
for ans in v6_answers:
|
for ans in v6_answers:
|
||||||
log.debug("Found AAAA record: %s", ans[0])
|
log.debug("Found AAAA record: %s", ans.address)
|
||||||
answers.append(((ans.address, port), 0, 0))
|
answers.append(((ans.address, port), 0, 0))
|
||||||
|
|
||||||
return answers
|
return answers
|
||||||
|
|
Loading…
Reference in a new issue