From 9b72522a01a323fb9ae35ed0b58690317682c0aa Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 11 May 2016 18:47:12 +0200 Subject: [PATCH] todo fix: not necessary in 0.10 branch --- fail2ban/tests/servertestcase.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fail2ban/tests/servertestcase.py b/fail2ban/tests/servertestcase.py index 1c05f5e8..90f7aaf2 100644 --- a/fail2ban/tests/servertestcase.py +++ b/fail2ban/tests/servertestcase.py @@ -1022,9 +1022,8 @@ class ServerConfigReaderTests(LogCaptureTestCase): # change log path to test log of jail (to prevent "Permission denied" on /var/logs/ for test-user): elif len(cmd) > 3 and cmd[0] == 'set' and cmd[2] == 'addlogpath': cmd[3] = os.path.join(TEST_FILES_DIR, 'logs', cmd[1]) - # add dummy regex to prevent too long compile of all regexp (we don't use it in this test at all): - # [todo sebres] remove `not hasattr(unittest, 'F2B') or `, after merge with "f2b-perfom-prepare-716" ... - elif (not hasattr(unittest, 'F2B') or unittest.F2B.fast) and ( + # if fast add dummy regex to prevent too long compile of all regexp (we don't use it in this test at all): + elif unittest.F2B.fast and ( len(cmd) > 3 and cmd[0] in ('set', 'multi-set') and cmd[2] == 'addfailregex' ): cmd[0] = "set"