fix
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 20 Oct 2008 23:00:59 +0000 (23:00 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Mon, 20 Oct 2008 23:00:59 +0000 (23:00 +0000)
lib/python/Components/TimerSanityCheck.py

index 54c8f44..e7cc8b9 100644 (file)
@@ -141,9 +141,12 @@ class TimerSanityCheck:
                                        self.nrep_eventlist.extend([(new_event_begin, event[1], self.bflag),(new_event_end, event[1], self.eflag)])
 
                def sort_func(x, y):
-                       if x[0] == y[0]:
-                               return cmp(y[2], x[2])
-                       return cmp(x[0], y[0])
+                       ret = cmp(x[0], y[0])
+                       if not ret:
+                               ret = cmp(y[2], x[2])
+                               if not ret:
+                                       return cmp(x[1], y[1])
+                       return ret
 ################################################################################
 # order list chronological
                self.nrep_eventlist.sort(sort_func)