Add missing comparisons on version

This commit is contained in:
Phillip Berndt 2023-01-16 09:55:17 +01:00
parent 3ba0a2c5ef
commit d285fd5fd4
1 changed files with 9 additions and 0 deletions

View File

@ -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