From 930211f00c35351da5fe20aaeed2bc9fd4a0b3dc Mon Sep 17 00:00:00 2001 From: pin Date: Mon, 26 Jul 2010 11:54:16 +0000 Subject: [PATCH 1/1] =?utf8?q?Affichage=20du=20mode=20de=20jeu=20dans=20le?= =?utf8?q?s=20r=C3=A9sultats.?= 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@291 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/minwii/loganalyse.py | 14 ++++++++------ src/minwii/logapp.py | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/minwii/loganalyse.py b/src/minwii/loganalyse.py index e33dfcf..d6d5a4d 100755 --- a/src/minwii/loganalyse.py +++ b/src/minwii/loganalyse.py @@ -62,14 +62,16 @@ class LogFileAnalyser(LogFileReader) : } def analyse(self) : - self.mode = mode = self.getMode() - print 'Mode :', mode - results = {} - for name in self.POSSIBLE_ANALYSES[mode] : - meth = getattr(self, name) - results[name] = meth() + try : + self.mode = mode = self.getMode() + results['playingMode'] = mode + for name in self.POSSIBLE_ANALYSES[mode] : + meth = getattr(self, name) + results[name] = meth() + except : + pass return results diff --git a/src/minwii/logapp.py b/src/minwii/logapp.py index 16be558..edc86e6 100755 --- a/src/minwii/logapp.py +++ b/src/minwii/logapp.py @@ -9,6 +9,7 @@ $URL$ from Tkinter import * import tkFileDialog from glob import glob +import os from os.path import join as pjoin from os.path import basename from os.path import getsize @@ -77,6 +78,7 @@ class Application(Frame) : while self.logFiles : f = self.logFiles.pop() if not getsize(f) : + os.remove(f) continue # TODO : vérifier qu'il existe des événements else : -- 2.20.1