mirror of https://github.com/fail2ban/fail2ban
MINOR: PEP-8 tweaks for multiline-matches change set
parent
60d298d898
commit
d9afcc178a
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue