fix DeprecationWarning in nslookup module
This commit is contained in:
parent
5cbcb2e6f2
commit
3c49d4ecd1
@ -6,7 +6,7 @@ def nslookup(domain, typ="A"):
|
||||
result = ""
|
||||
rcount = 0
|
||||
try:
|
||||
answer = dns.resolver.query(domain, typ)
|
||||
answer = dns.resolver.resolve(domain, typ)
|
||||
for rdata in answer:
|
||||
if rcount > 0:
|
||||
result += "\n"
|
||||
|
Loading…
Reference in New Issue
Block a user