Add ge method to custom Version type

Fixes crash with xrandr version comparison.
This commit is contained in:
Markus Lehtonen 2023-01-16 10:16:19 +02:00 committed by Phillip Berndt
parent 4bb03ef208
commit 3ba0a2c5ef
1 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,8 @@ class Version(object):
return True return True
return len(theirs) > len(my) return len(theirs) > len(my)
def __ge__(self, other):
return not (self < other)
def is_closed_lid(output): def is_closed_lid(output):
if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output): if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output):