mirror of https://github.com/fail2ban/fail2ban
Fix DNSUtils dnsToIp not catching general socket.error exception
parent
0dd3a81ba2
commit
c8c9ed4dfc
|
@ -605,7 +605,7 @@ class DNSUtils:
|
|||
"""
|
||||
try:
|
||||
return socket.gethostbyname_ex(dns)[2]
|
||||
except socket.gaierror:
|
||||
except socket.error:
|
||||
logSys.warn("Unable to find a corresponding IP address for %s"
|
||||
% dns)
|
||||
return list()
|
||||
|
|
Loading…
Reference in New Issue