From 3ba0a2c5eff4d876c87d9fc834f389613a72a759 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 16 Jan 2023 10:16:19 +0200 Subject: [PATCH] Add ge method to custom Version type Fixes crash with xrandr version comparison. --- autorandr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autorandr.py b/autorandr.py index 56db59a..3eb3a9b 100755 --- a/autorandr.py +++ b/autorandr.py @@ -135,6 +135,8 @@ class Version(object): return True return len(theirs) > len(my) + def __ge__(self, other): + return not (self < other) def is_closed_lid(output): if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output): -- 2.39.2