mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
amend to c2d2e79b0d: missing error variable in import block;
additionally fixes forgotten skip for cymru server case, if --no-network specified); Closes #1568
This commit is contained in:
parent
c2d2e79b0d
commit
973ac9a45c
2 changed files with 2 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ class BanManager:
|
|||
resolver.lifetime = timeout
|
||||
resolver.timeout = timeout / 2
|
||||
self.dnsResolver = resolver
|
||||
except ImportError: # pragma: no cover
|
||||
except ImportError as e: # pragma: no cover
|
||||
logSys.error("dnspython package is required but could not be imported")
|
||||
return_dict["error"] = repr(e)
|
||||
return_dict["asn"].append("error")
|
||||
|
|
|
|||
|
|
@ -559,6 +559,7 @@ class Transmitter(TransmitterBase):
|
|||
)
|
||||
|
||||
def testJailStatusCymru(self):
|
||||
unittest.F2B.SkipIfNoNetwork()
|
||||
try:
|
||||
import dns.exception
|
||||
import dns.resolver
|
||||
|
|
|
|||
Loading…
Reference in a new issue