From 323c312f13c8d50918c0b8e6350454e6112487ab Mon Sep 17 00:00:00 2001 From: pin Date: Wed, 28 Jul 2010 14:11:21 +0000 Subject: [PATCH 1/1] =?utf8?q?Bizarrerie=20Windows=20:=20il=20n'arrive=20p?= =?utf8?q?as=20=C3=A0=20virer=20un=20fichier=20imm=C3=A9diatement=20apr?= =?utf8?q?=C3=A8s=20lui=20avoir=20demand=C3=A9=20sa=20taille=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@302 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/minwii/logapp.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.20.1