]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Add missing comparisons on version
authorPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 16 Jan 2023 08:55:17 +0000 (09:55 +0100)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 16 Jan 2023 08:55:17 +0000 (09:55 +0100)
autorandr.py

index 3eb3a9b60b95be496d15740cf382b503d8e3a841..1f44c2821e40e73ea6f47c347441c9b3ca85307b 100755 (executable)
@@ -138,6 +138,15 @@ class Version(object):
     def __ge__(self, other):
         return not (self < other)
 
+    def __ne__(self, other):
+        return not (self == other)
+
+    def __le__(self, other):
+        return (self < other) or (self == other)
+
+    def __gt__(self, other):
+        return self >= other and not (self == other)
+
 def is_closed_lid(output):
     if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output):
         return False