From d9afcc178ae80ec838ba93048c070d1c5d280690 Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Fri, 13 Dec 2013 16:38:26 +0000 Subject: [PATCH] MINOR: PEP-8 tweaks for multiline-matches change set --- bin/fail2ban-regex | 2 +- fail2ban/server/filter.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/fail2ban-regex b/bin/fail2ban-regex index b0a78828..14c3e319 100755 --- a/bin/fail2ban-regex +++ b/bin/fail2ban-regex @@ -309,7 +309,7 @@ class Fail2banRegex(object): def testIgnoreRegex(self, line): found = False try: - ret = self._filter.ignoreLine([(line,"","")]) + ret = self._filter.ignoreLine([(line, "", "")]) if ret is not None: found = True regex = self._ignoreregex[ret].inc() diff --git a/fail2ban/server/filter.py b/fail2ban/server/filter.py index 051135b0..45ff83c0 100644 --- a/fail2ban/server/filter.py +++ b/fail2ban/server/filter.py @@ -366,9 +366,12 @@ class Filter(JailThread): timeMatch = self.dateDetector.matchTime(l) if timeMatch: - tupleLine = (l[:timeMatch.start()], l[timeMatch.start():timeMatch.end()] , l[timeMatch.end():]) + tupleLine = ( + l[:timeMatch.start()], + l[timeMatch.start():timeMatch.end()], + l[timeMatch.end():]) else: - tupleLine = (l,"","") + tupleLine = (l, "", "") return "".join(tupleLine[::2]), self.findFailure( tupleLine, returnRawHost, checkAllRegex)