--- a/log_source.py Wed Feb 11 03:58:20 2009 +0200
+++ b/log_source.py Wed Feb 11 04:04:55 2009 +0200
@@ -377,12 +377,12 @@
# convert to date and use that
return self._get_logfile_date(dtz.date())
- def _get_logfile_date (self, d, load=True, stat=False, ignore_missing=True) :
+ def _get_logfile_date (self, d, load=True, mtime=False, ignore_missing=True) :
"""
Get the logfile corresponding to the given naive date in our timezone.
- If load is False, only test for the presence of the logfile, do not actually open it. If stat is given,
- then this returns the stat() result
+ If load is False, only test for the presence of the logfile, do not actually open it. If mtime is given,
+ then this returns the file's mtime
Returns None if the logfile does not exist, unless ignore_missing is given as False.
"""
@@ -398,9 +398,9 @@
# open+return the LogFile
return LogFile(path, self.parser, self.decoder, start_date=d, channel=self.channel)
- elif stat :
+ elif mtime :
# stat
- return os.stat(path)
+ return utils.mtime(path)
else :
# test
@@ -627,10 +627,10 @@
# compare against dt?
if dt :
# stat
- st = self._get_logfile_date(log_date, load=False, stat=True)
-
+ mtime = self._get_logfile_date(log_date, load=False, mtime=True)
+
# not modified?
- if utils.from_utc_timestamp(st.st_mtime) < dt :
+ if mtime < dt :
# skip
continue