mirror of https://github.com/fail2ban/fail2ban
fixed py3 incompatibility (for some reasons this file seems to be excluded from 2to3), anyway not needed, because int-type is already checked in str2LogLevel
parent
4b751c84c3
commit
65676baf8c
|
@ -104,7 +104,7 @@ class BadIPsAction(ActionBase): # pragma: no cover - may be unavailable
|
|||
self.banaction = banaction
|
||||
self.bancategory = bancategory or category
|
||||
self.bankey = bankey
|
||||
self.loglevel = str2LogLevel(loglevel) if isinstance(val, basestring) else loglevel
|
||||
self.loglevel = str2LogLevel(loglevel)
|
||||
self.updateperiod = updateperiod
|
||||
|
||||
self._bannedips = set()
|
||||
|
@ -350,7 +350,7 @@ class BadIPsAction(ActionBase): # pragma: no cover - may be unavailable
|
|||
s = ips - self._bannedips
|
||||
p = len(s)
|
||||
self._banIPs(s)
|
||||
self._logSys.info(
|
||||
self._logSys.log(self.loglevel,
|
||||
"Updated IPs for jail '%s' (-%d/+%d). Update again in %i seconds",
|
||||
self._jail.name, m, p, self.updateperiod)
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue