- Better exception handling in isModified()

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@205 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.5
Cyril Jaquier 19 years ago
parent 2701d7500b
commit 2c1a0785c5

@ -97,15 +97,15 @@ class LogReader:
"""
try:
self.logStats = os.stat(self.logPath)
except OSError:
logSys.error("Unable to get stat on "+self.logPath)
if self.lastModTime == self.logStats.st_mtime:
return False
else:
logSys.debug(self.logPath+" has been modified")
self.lastModTime = self.logStats.st_mtime
return True
except OSError:
logSys.error("Unable to get stat on "+self.logPath)
return False
def setFilePos(self, file):
""" Sets the file position. We must take care of log file rotation

Loading…
Cancel
Save