From c1d0fff78c1489f70c6b696a0ced351b1d1a8008 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 8 Feb 2021 13:20:17 +0100 Subject: [PATCH 242/325] tools/sched/schedgraph.py: implement __lt__ for EventSource so sorting works. XXX: is coparing y correct? Obtained from: ElectroBSD --- tools/sched/schedgraph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/sched/schedgraph.py b/tools/sched/schedgraph.py index 298f3a0774f9..233492dea422 100755 --- a/tools/sched/schedgraph.py +++ b/tools/sched/schedgraph.py @@ -814,6 +814,9 @@ def __cmp__(self, other): return cmp(self.name, other.name) return cmp(self.group, other.group) + def __lt__(self, other): + return self.y < other.y + # It is much faster to append items to a list then to insert them # at the beginning. As a result, we add events in reverse order # and then swap the list during fixup. -- 2.32.0