X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/a697b3d25f51aa781aa3f08762efba3395f26c26..323c312f13c8d50918c0b8e6350454e6112487ab:/src/minwii/logapp.py diff --git a/src/minwii/logapp.py b/src/minwii/logapp.py index b10ca16..323e293 100755 --- a/src/minwii/logapp.py +++ b/src/minwii/logapp.py @@ -26,7 +26,7 @@ class Application(Frame) : self.resultsFrame = None # debug - self.chooseDirDialog(dir='/Users/pinbe/minwii_logs') + #self.chooseDirDialog(dir='/Users/pinbe/minwii_logs') def configureStretching(self) : top=self.winfo_toplevel() @@ -76,19 +76,23 @@ class Application(Frame) : def _cleanupJunkFiles(self) : files = [] + junk = [] while self.logFiles : f = self.logFiles.pop() if not getsize(f) : - os.remove(f) + junk.append(f) continue else : lfa = LogFileAnalyser(f) if lfa.getLastEventTicks() is None : - os.remove(f) + junk.append(f) continue files.append(f) + for f in junk : + os.remove(f) + self.logFiles = files