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
|
n = 0
|
||||||
while True:
|
while True:
|
||||||
try:
|
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
|
n += 1
|
||||||
except IndexError:
|
except IndexError:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue