Resuse internal dns query method to wrap errors

This commit is contained in:
Michael Kroes 2016-02-28 21:40:47 +01:00
parent 4f14460453
commit 14f7ef6b20
1 changed files with 1 additions and 1 deletions

View File

@ -421,7 +421,7 @@ def query_dns_ptr(qname):
rr = rrset[0]
if rr.rdtype != dns.rdatatype.SOA:
authority = rr.target
nameserver = resolver.query(authority).rrset[0].to_text()
nameserver = query_dns(authority, "A")
# Resolve the PTR record using the proper name server
return query_dns(qname, "PTR", at=nameserver)