From: Phillip Berndt Date: Mon, 16 Jan 2023 08:55:17 +0000 (+0100) Subject: Add missing comparisons on version X-Git-Tag: 1.13.1~1 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=d285fd5fd4b13afc2bd90af9792a0f599ef82b3e Add missing comparisons on version --- diff --git a/autorandr.py b/autorandr.py index 3eb3a9b..1f44c28 100755 --- a/autorandr.py +++ b/autorandr.py @@ -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