diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index d3299144..28ee8ef5 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -72,7 +72,7 @@ class Regex: # Sets an internal cache (match object) in order to avoid searching for # the pattern again. This method must be called before calling any other # method of this object. - # @param value the line + # @param a list of tupples. The tupples are ( prematch, datematch, postdatematch ) def search(self, tupleLines): self._matchCache = self._regexObj.search( diff --git a/fail2ban/tests/servertestcase.py b/fail2ban/tests/servertestcase.py index 082c20de..bbfc0f0f 100644 --- a/fail2ban/tests/servertestcase.py +++ b/fail2ban/tests/servertestcase.py @@ -753,7 +753,7 @@ class RegexTests(unittest.TestCase): # e.g. if we made it optional. fr = FailRegex('%%?') self.assertFalse(fr.hasMatched()) - fr.search(("%%",)) + fr.search([('%%',"","")]) self.assertTrue(fr.hasMatched()) self.assertRaises(RegexException, fr.getHost)