mirror of https://github.com/fail2ban/fail2ban
BF: Allow handle case when SKIPLINES lines is not matched
Example is when one or more SKIPLINES is optional in a regexpull/476/head
parent
c886414e2e
commit
c03a50b44b
|
@ -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 New Issue