]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Add ge method to custom Version type
authorMarkus Lehtonen <markus.lehtonen@intel.com>
Mon, 16 Jan 2023 08:16:19 +0000 (10:16 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 16 Jan 2023 08:52:50 +0000 (09:52 +0100)
Fixes crash with xrandr version comparison.

autorandr.py

index 56db59a34dc6cdad8b2ccfb20572f3462a9b57bc..3eb3a9b60b95be496d15740cf382b503d8e3a841 100755 (executable)
@@ -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):