[Checkins] SVN: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/models.py fixed racing condition in cleanup code
Andreas Jung
andreas at andreas-jung.com
Thu Feb 4 03:21:15 EST 2010
Log message for revision 108744:
fixed racing condition in cleanup code
Changed:
U zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/models.py
-=-
Modified: zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/models.py
===================================================================
--- zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/models.py 2010-02-04 00:40:18 UTC (rev 108743)
+++ zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/models.py 2010-02-04 08:21:14 UTC (rev 108744)
@@ -76,7 +76,8 @@
fullname = os.path.join(self.spool_directory, name)
age = time.time() - os.stat(fullname)[ST_CTIME]
if age > self.keep_files_for:
- shutil.rmtree(fullname)
+ if os.path.exists(fullname):
+ shutil.rmtree(fullname)
def _inject_base_tag(self, html_filename):
""" All input HTML files contain relative urls (relative
More information about the checkins
mailing list