From 65676baf8c5eb3917269f99e6f8fb2fb8e422291 Mon Sep 17 00:00:00 2001 From: "Sergey G. Brester" Date: Tue, 2 Oct 2018 12:38:29 +0200 Subject: [PATCH] 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 --- config/action.d/badips.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/action.d/badips.py b/config/action.d/badips.py index 0d03f1d1..1ad711f4 100644 --- a/config/action.d/badips.py +++ b/config/action.d/badips.py @@ -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: