tools/measure-touchpad-pressure: require max > min for a range

Otherwise a resulting quirk will fail when parsed by libinput which
enforces this too.

Closes #1060

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1089>
This commit is contained in:
Peter Hutterer 2024-12-10 08:08:50 +10:00 committed by Marge Bot
parent c3aa00ef90
commit 9988f4242e

View file

@ -364,12 +364,12 @@ def colon_tuple(string):
try:
ts = string.split(":")
t = tuple([int(x) for x in ts])
if len(t) == 2 and t[0] >= t[1]:
if len(t) == 2 and t[0] > t[1]:
return t
except: # noqa
pass
msg = "{} is not in format N:M (N >= M)".format(string)
msg = "{} is not in format N:M (N > M)".format(string)
raise argparse.ArgumentTypeError(msg)