diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index f7279931..d5732c80 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -133,7 +133,8 @@ class Regex: n = 0 while True: try: - skippedLines += self._matchCache.group("skiplines%i" % n) + if self._matchCache.group("skiplines%i" % n) is not None: + skippedLines += self._matchCache.group("skiplines%i" % n) n += 1 except IndexError: break