You've already forked da-ddnsclient
Fix deprecation: use dns.resolver.resolve()
This commit is contained in:
@@ -30,13 +30,13 @@ def get_directadmin_client(url, username, password):
|
|||||||
|
|
||||||
|
|
||||||
def getipv6(hostname):
|
def getipv6(hostname):
|
||||||
answers = dns.resolver.query(hostname, 'AAAA')
|
answers = dns.resolver.resolve(hostname, 'AAAA')
|
||||||
for ip in answers:
|
for ip in answers:
|
||||||
return str(ip).strip()
|
return str(ip).strip()
|
||||||
|
|
||||||
|
|
||||||
def getipv4(hostname):
|
def getipv4(hostname):
|
||||||
answers = dns.resolver.query(hostname, 'A')
|
answers = dns.resolver.resolve(hostname, 'A')
|
||||||
for ip in answers:
|
for ip in answers:
|
||||||
return str(ip).strip()
|
return str(ip).strip()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user