mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-04 14:48:08 +00:00
Fix DNSUtils dnsToIp not catching general socket.error exception
This commit is contained in:
parent
0dd3a81ba2
commit
c8c9ed4dfc
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue