mirror of https://github.com/fail2ban/fail2ban
DOC: Revert dnsToIp error change, seperate log message for socket.error
parent
88187fc161
commit
a8f2e02eea
|
@ -664,10 +664,14 @@ class DNSUtils:
|
|||
"""
|
||||
try:
|
||||
return socket.gethostbyname_ex(dns)[2]
|
||||
except socket.error:
|
||||
except socket.gaierror:
|
||||
logSys.warn("Unable to find a corresponding IP address for %s"
|
||||
% dns)
|
||||
return list()
|
||||
except socket.error, e:
|
||||
logSys.warn("Socket error raised trying to resolve hostname %s: %s"
|
||||
% (dns, e))
|
||||
return list()
|
||||
dnsToIp = staticmethod(dnsToIp)
|
||||
|
||||
#@staticmethod
|
||||
|
|
Loading…
Reference in New Issue