From cf9c8f1e9b3a712525e46d5e6a894aab90e80ca5 Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 4 Mar 2025 14:27:21 +0100 Subject: [PATCH] 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) --- fail2ban/tests/samplestestcase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fail2ban/tests/samplestestcase.py b/fail2ban/tests/samplestestcase.py index 15cdf646..40c9a8ae 100644 --- a/fail2ban/tests/samplestestcase.py +++ b/fail2ban/tests/samplestestcase.py @@ -205,6 +205,7 @@ def testSampleRegexsFactory(name, basedir): raise ValueError("%s: %s:%i" % (e, logFile.getFileName(), lnnum)) line = next(logFile) + lnnum += 1 elif ignoreBlock or line.startswith("#") or not line.strip(): continue else: # pragma: no cover - normally unreachable