mirror of https://github.com/fail2ban/fail2ban
- Fixed bugs introduced by refactoring
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@369 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
126807dea8
commit
4b80546f10
|
@ -282,7 +282,7 @@ class Filter(JailThread):
|
|||
##
|
||||
# Close the log file.
|
||||
|
||||
def closeLogFile(self):
|
||||
def __closeLogFile(self):
|
||||
self.crtFilename = None
|
||||
self.crtHandler.close()
|
||||
|
||||
|
@ -319,7 +319,7 @@ class Filter(JailThread):
|
|||
# time.time()-self.findTime. When a failure is detected, a FailTicket
|
||||
# is created and is added to the FailManager.
|
||||
|
||||
def __getFailures(self, filename):
|
||||
def getFailures(self, filename):
|
||||
ipList = dict()
|
||||
logSys.debug(filename)
|
||||
self.openLogFile(filename)
|
||||
|
@ -350,7 +350,7 @@ class Filter(JailThread):
|
|||
self.lastPos[filename] = self.__getFilePos()
|
||||
if lastLine:
|
||||
self.lastDate[filename] = self.dateDetector.getTime(lastLine)
|
||||
self.closeLogFile()
|
||||
self.__closeLogFile()
|
||||
|
||||
##
|
||||
# Finds the failure in a line.
|
||||
|
|
|
@ -61,7 +61,7 @@ class FilterGamin(Filter):
|
|||
logSys.debug("Got event: " + `event` + " for " + path)
|
||||
if event in (gamin.GAMCreated, gamin.GAMChanged, gamin.GAMExists):
|
||||
logSys.debug("File changed: " + path)
|
||||
self.__getFailures(path)
|
||||
self.getFailures(path)
|
||||
self.modified = True
|
||||
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class FilterPoll(Filter):
|
|||
# Get file modification
|
||||
for file in self.getLogPath():
|
||||
if self.isModified(file):
|
||||
self.__getFailures(file)
|
||||
self.getFailures(file)
|
||||
prevModified = True
|
||||
|
||||
if self.modified:
|
||||
|
|
Loading…
Reference in New Issue