]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - autorandr.py
Fix matching EDIDs with wildcards
[deb_pkgs/autorandr.git] / autorandr.py
index 3eb3a9b60b95be496d15740cf382b503d8e3a841..db835fb8311796ca4482cfdf2299767a5dcb58ac 100755 (executable)
@@ -50,7 +50,7 @@ if sys.version_info.major == 2:
 else:
     import configparser
 
-__version__ = "1.13"
+__version__ = "1.13.1"
 
 try:
     input = raw_input
@@ -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
@@ -350,6 +359,8 @@ class XrandrOutput(object):
         if self.edid:
             if self.EDID_UNAVAILABLE in self.edid:
                 return
+            if "*" in self.edid:
+                return
             # Thx to pyedid project, the following code was
             # copied (and modified) from pyedid/__init__py:21 [parse_edid()]
             raw = bytes.fromhex(self.edid)