summaryrefslogtreecommitdiff
path: root/fail2ban
diff options
context:
space:
mode:
authorsebres <serg.brester@sebres.de>2022-02-08 19:57:40 +0100
committersebres <serg.brester@sebres.de>2022-02-08 19:57:40 +0100
commit8013cf0b900f2cacfdc1c9152c9b9847bfc41877 (patch)
tree8086946242d358dcec2737be181284ad8490567d /fail2ban
parent810386a265d621a0af9f4917f68fae9bf95d1ba4 (diff)
downloadfail2ban-8013cf0b900f2cacfdc1c9152c9b9847bfc41877.tar.gz
python actions have no attribute 'consistencyCheck' by default;
closes gh-3214
Diffstat (limited to 'fail2ban')
-rw-r--r--fail2ban/server/actions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fail2ban/server/actions.py b/fail2ban/server/actions.py
index 897d907c..eb14c14f 100644
--- a/fail2ban/server/actions.py
+++ b/fail2ban/server/actions.py
@@ -513,9 +513,10 @@ class Actions(JailThread, Mapping):
if bTicket.banEpoch == self.banEpoch and diftm > 3:
# avoid too often checks:
if not rebanacts and MyTime.time() > self.__lastConsistencyCheckTM + 3:
- for action in self._actions.itervalues():
- action.consistencyCheck()
self.__lastConsistencyCheckTM = MyTime.time()
+ for action in self._actions.itervalues():
+ if hasattr(action, 'consistencyCheck'):
+ action.consistencyCheck()
# check epoch in order to reban it:
if bTicket.banEpoch < self.banEpoch:
if not rebanacts: rebanacts = dict(