X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/2acf10a88b2307eeb78f74b612586dd079c1b7bf..9dc58a99930c4951aa561d75e572416221c3aa33:/src/minwii/logapp.py?ds=inline diff --git a/src/minwii/logapp.py b/src/minwii/logapp.py index 9306809..b10ca16 100755 --- a/src/minwii/logapp.py +++ b/src/minwii/logapp.py @@ -61,13 +61,14 @@ class Application(Frame) : def chooseDirDialog(self, dir=None) : if dir is None : - self.logDir = tkFileDialog.askdirectory() + self.logDir = tkFileDialog.askdirectory(title='Sélectionnez un dossier de fichiers de logs') else : self.logDir = dir if self.logDir : self.logFiles = glob(pjoin(self.logDir, '*.log')) self._cleanupJunkFiles() self.logFiles.sort() + self.logFiles.reverse() self.dataFrame.grid(row=0, column=0, sticky=NW) self.nav.setSize(len(self.logFiles)) self.nav.grid(row=0, column=1) @@ -80,8 +81,12 @@ class Application(Frame) : if not getsize(f) : os.remove(f) continue - # TODO : vérifier qu'il existe des événements else : + lfa = LogFileAnalyser(f) + if lfa.getLastEventTicks() is None : + os.remove(f) + continue + files.append(f) self.logFiles = files