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 54c8f44c61bd07f52362b0d9d1eeacb9a8b09205..e7cc8b9b6f65e5f2c15db4a02a32bcfdf7e686cd 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)