From: <los...@us...> - 2008-02-02 17:13:56
|
Revision: 649 http://fail2ban.svn.sourceforge.net/fail2ban/?rev=649&view=rev Author: lostcontrol Date: 2008-02-02 09:04:11 -0800 (Sat, 02 Feb 2008) Log Message: ----------- - Added missing argument. - Fixed use of FileContainer in filterpoll.py. Modified Paths: -------------- branches/FAIL2BAN-0_8/server/filtergamin.py branches/FAIL2BAN-0_8/server/filterpoll.py Modified: branches/FAIL2BAN-0_8/server/filtergamin.py =================================================================== --- branches/FAIL2BAN-0_8/server/filtergamin.py 2008-02-02 16:59:45 UTC (rev 648) +++ branches/FAIL2BAN-0_8/server/filtergamin.py 2008-02-02 17:04:11 UTC (rev 649) @@ -69,12 +69,12 @@ # # @param path log file path - def addLogPath(self, path): + def addLogPath(self, path, tail = False): if self.containsLogPath(path): logSys.error(path + " already exists") else: self.monitor.watch_file(path, self.callback) - FileFilter.addLogPath(self, path) + FileFilter.addLogPath(self, path, tail) logSys.info("Added logfile = %s" % path) ## Modified: branches/FAIL2BAN-0_8/server/filterpoll.py =================================================================== --- branches/FAIL2BAN-0_8/server/filterpoll.py 2008-02-02 16:59:45 UTC (rev 648) +++ branches/FAIL2BAN-0_8/server/filterpoll.py 2008-02-02 17:04:11 UTC (rev 649) @@ -61,13 +61,13 @@ # # @param path log file path - def addLogPath(self, path): + def addLogPath(self, path, tail = False): if self.containsLogPath(path): logSys.error(path + " already exists") else: self.__lastModTime[path] = 0 self.__file404Cnt[path] = 0 - FileFilter.addLogPath(self, path) + FileFilter.addLogPath(self, path, tail) logSys.info("Added logfile = %s" % path) ## @@ -96,9 +96,9 @@ while self._isActive(): if not self.getIdle(): # Get file modification - for f in self.getLogPath(): - if self.isModified(f): - self.getFailures(f) + for container in self.getLogPath(): + if self.isModified(container.getFileName()): + self.getFailures(container.getFileName()) self.__modified = True if self.__modified: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |