[Spambayes-checkins] spambayes/spambayes FileCorpus.py,1.4,1.5
Tim Stone
timstone4 at users.sourceforge.net
Sun May 4 19:22:14 EDT 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv15797
Modified Files:
FileCorpus.py
Log Message:
Corrected uncaught exception problem when a file in the cache mysteriously
disappears from the filesystem.
Index: FileCorpus.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/FileCorpus.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileCorpus.py 4 May 2003 03:05:33 -0000 1.4
--- FileCorpus.py 5 May 2003 01:22:11 -0000 1.5
***************
*** 276,281 ****
'''Return the create timestamp for the file'''
! stats = os.stat(self.pathname())
! ctime = stats[stat.ST_CTIME]
return ctime
--- 276,287 ----
'''Return the create timestamp for the file'''
! # make sure we don't die if someone has
! #removed the file out from underneath us
! try:
! stats = os.stat(self.pathname())
! except OSError, e:
! ctime = time.time()
! else:
! ctime = stats[stat.ST_CTIME]
return ctime
More information about the Spambayes-checkins
mailing list