MINOR: PEP-8 tweaks for multiline-matches change set

pull/476/head
Steven Hiscocks 2013-12-13 16:38:26 +00:00
parent 60d298d898
commit d9afcc178a
2 changed files with 6 additions and 3 deletions

View File

@ -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()

View File

@ -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)