diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/TimerSanityCheck.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/python/Components/TimerSanityCheck.py b/lib/python/Components/TimerSanityCheck.py index 54c8f44c..e7cc8b9b 100644 --- a/lib/python/Components/TimerSanityCheck.py +++ b/lib/python/Components/TimerSanityCheck.py @@ -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) |
