Amélioration du layout de la barre de boutons.
[minwii.git] / src / minwii / loganalyse.py
index e33dfcf..73581cb 100755 (executable)
@@ -6,9 +6,9 @@ $Id$
 $URL$
 """
 
-from logfilereader import LogFileReader
+from minwii.logfilereader import LogFileReader
 from pprint import pprint
-from musicxml import musicXml2Song
+from minwii.musicxml import musicXml2Song
 from statlib import stats
 
 DEFAULT_STATS = ('geometricmean',
@@ -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