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