tools/measure-touchpad-pressure: require max > min for a range
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 9 Dec 2024 22:08:50 +0000 (08:08 +1000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 Dec 2024 10:00:39 +0000 (10:00 +0000)
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>

tools/libinput-measure-touchpad-pressure.py

index 6242fb51a809cd2eea584e91514a45bd8374ac5a..5d145fc308cfcc44ad3761a358488e00e3536544 100755 (executable)
@@ -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)