mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
amend to c2d2e79b0d: fixed sporadically bug in getBanListExtendedCymruInfo:
except dns.resolver.NXDOMAIN: UnboundLocalError: local variable 'dns' referenced before assignment
This commit is contained in:
parent
973ac9a45c
commit
2d2d4cf185
1 changed files with 1 additions and 0 deletions
|
|
@ -135,6 +135,7 @@ class BanManager:
|
|||
def getBanListExtendedCymruInfo(self, timeout=10):
|
||||
return_dict = {"asn": [], "country": [], "rir": []}
|
||||
if not hasattr(self, 'dnsResolver'):
|
||||
global dns
|
||||
try:
|
||||
import dns.exception
|
||||
import dns.resolver
|
||||
|
|
|
|||
Loading…
Reference in a new issue