Bugfixes.

This commit is contained in:
Gaetan Delannay 2011-02-28 19:30:17 +01:00
parent 39321b2d38
commit c7633ecc8b
5 changed files with 22 additions and 16 deletions

View file

@ -157,8 +157,7 @@ class ZodbBackuper:
remove the temp files that could not be removed by Zope.'''
w = self.log
w('Removing temp files in "%s"...' % self.tempFolder)
pdfCount = 0
docCount = 0
pdfCount = docCount = rtfCount = odtCount = 0
for fileName in os.listdir(self.tempFolder):
ext = os.path.splitext(fileName)[1]
if ext in self.toRemoveExts:
@ -169,8 +168,8 @@ class ZodbBackuper:
os.remove(fullFileName)
except OSError, oe:
w('Could not remove "%s" (%s).' % (fullFileName, str(oe)))
w('%d PDF document(s) removed.' % pdfCount)
w('%d Word document(s) removed.' % docCount)
w('%d .pdf, %d .doc, %d .rtf and %d .odt file(s) removed.' % \
(pdfCount, docCount, rtfCount, odtCount))
def run(self):
w = self.log