ENH: minor, just trailing spaces/tabs + reformated a string

pull/8/merge
Yaroslav Halchenko 2012-06-29 12:58:53 -04:00
parent 215c3cc5c5
commit 9b360bb12d
1 changed files with 72 additions and 68 deletions

View File

@ -278,6 +278,8 @@ class Filter(JailThread):
def processLine(self, line):
"""Split the time portion from log msg and return findFailures on them
"""
try:
# Decode line to UTF-8
l = line.decode('utf-8')
@ -297,6 +299,8 @@ class Filter(JailThread):
return self.findFailure(timeLine, logLine)
def processLineAndAdd(self, line):
"""Processes the line for failures and populates failManager
"""
for element in self.processLine(line):
ip = element[0]
unixTime = element[1]
@ -346,11 +350,11 @@ class Filter(JailThread):
# The failregex matched.
date = self.dateDetector.getUnixTime(timeLine)
if date == None:
logSys.debug("Found a match for '" + logLine +"' but no "
+ "valid date/time found for '"
+ timeLine + "'. Please contact the "
+ "author in order to get support for this "
+ "format")
logSys.debug("Found a match for %r but no valid date/time "
"found for %r. Please file a detailed issue on"
" https://github.com/fail2ban/fail2ban/issues "
"in order to get support for this format."
% (logLine, timeLine))
else:
try:
host = failRegex.getHost()