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

pull/2205/head
Sergey G. Brester 2018-10-02 12:38:29 +02:00 committed by sebres
parent 4b751c84c3
commit 65676baf8c
1 changed files with 2 additions and 2 deletions

View File

@ -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: