mirror of https://github.com/fail2ban/fail2ban
amend to c2d2e79b0d48bf66b04c3772c2419f30a4b1f9db: fixed sporadically bug in getBanListExtendedCymruInfo:
except dns.resolver.NXDOMAIN: UnboundLocalError: local variable 'dns' referenced before assignmentpull/1571/head
parent
973ac9a45c
commit
2d2d4cf185
|
@ -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 New Issue