X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/blobdiff_plain/73301d45fc7fbc65d3dbb551be8ffddf97588cd2..323c312f13c8d50918c0b8e6350454e6112487ab:/src/minwii/logapp.py?ds=sidebyside 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