]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Add missing comparisons on version
[deb_pkgs/autorandr.git] / autorandr.py
index 57056aad936d068e41388e769b29088ba8d54729..1f44c2821e40e73ea6f47c347441c9b3ca85307b 100755 (executable)
@@ -50,7 +50,7 @@ if sys.version_info.major == 2:
 else:
     import configparser
 
-__version__ = "1.12.1"
+__version__ = "1.13"
 
 try:
     input = raw_input
@@ -135,6 +135,17 @@ class Version(object):
                 return True
         return len(theirs) > len(my)
 
+    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):