From: Markus Lehtonen Date: Mon, 16 Jan 2023 08:16:19 +0000 (+0200) Subject: Add ge method to custom Version type X-Git-Tag: 1.13.1~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3ba0a2c5eff4d876c87d9fc834f389613a72a759;p=deb_pkgs%2Fautorandr.git Add ge method to custom Version type Fixes crash with xrandr version comparison. --- 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):