Sync helpers.
This commit is contained in:
parent
e7a2d152ec
commit
bdc78c53ec
@ -310,10 +310,10 @@ def get_host_ip(hostname):
|
||||
the input if it is already an IP.
|
||||
"""
|
||||
try:
|
||||
import dns.resolver.query
|
||||
import dns.resolver
|
||||
except ImportError:
|
||||
apt_install('python-dnspython')
|
||||
import dns.resolver.query
|
||||
import dns.resolver
|
||||
|
||||
if is_ip(hostname):
|
||||
return hostname
|
||||
|
Loading…
x
Reference in New Issue
Block a user