mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
BF: Allow handle case when SKIPLINES lines is not matched
Example is when one or more SKIPLINES is optional in a regex
This commit is contained in:
parent
c886414e2e
commit
c03a50b44b
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue