mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
DOC: Revert dnsToIp error change, seperate log message for socket.error
This commit is contained in:
parent
88187fc161
commit
a8f2e02eea
1 changed files with 5 additions and 1 deletions
|
|
@ -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 a new issue