Print better information when AXFR fails
This commit is contained in:
parent
a270770ec2
commit
1da98a4497
|
@ -288,10 +288,11 @@ class AXFRDaemonInstance(object):
|
||||||
|
|
||||||
# Get an AXFR from the dnsmasq instance and list of records
|
# Get an AXFR from the dnsmasq instance and list of records
|
||||||
try:
|
try:
|
||||||
z = dns.zone.from_xfr(dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0))
|
axfr = dns.query.xfr(dnsmasq_ip, domain, lifetime=5.0)
|
||||||
|
z = dns.zone.from_xfr(axfr)
|
||||||
records_raw = [z[n].to_text(n) for n in z.nodes.keys()]
|
records_raw = [z[n].to_text(n) for n in z.nodes.keys()]
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print('{} ({})'.format(e, domain))
|
print('{} {} ({})'.format(e, dnsmasq_ip, domain))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Fix the formatting because it's useless
|
# Fix the formatting because it's useless
|
||||||
|
|
Loading…
Reference in New Issue