mirror of https://github.com/fail2ban/fail2ban
test-suite: fixed sample regexs factory counting of line number (if it errors, the line number showing in error line was incorrect, because of missing increment)
parent
c035428535
commit
cf9c8f1e9b
|
@ -205,6 +205,7 @@ def testSampleRegexsFactory(name, basedir):
|
||||||
raise ValueError("%s: %s:%i" %
|
raise ValueError("%s: %s:%i" %
|
||||||
(e, logFile.getFileName(), lnnum))
|
(e, logFile.getFileName(), lnnum))
|
||||||
line = next(logFile)
|
line = next(logFile)
|
||||||
|
lnnum += 1
|
||||||
elif ignoreBlock or line.startswith("#") or not line.strip():
|
elif ignoreBlock or line.startswith("#") or not line.strip():
|
||||||
continue
|
continue
|
||||||
else: # pragma: no cover - normally unreachable
|
else: # pragma: no cover - normally unreachable
|
||||||
|
|
Loading…
Reference in New Issue