From fe2a2a4f46a87da819c44310e2f12f1db8d7910f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 10 Dec 2016 02:28:24 -0500 Subject: hwdb_parser: make sure that our patterns match the full property We would catch stuff like: ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0.0., 0 but not ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 0.0. because the match would stop at the next-to-last char. Fix that by requiring a line end. --- hwdb/parse_hwdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwdb/parse_hwdb.py') diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py index ec97ed7807..18f13edd0a 100755 --- a/hwdb/parse_hwdb.py +++ b/hwdb/parse_hwdb.py @@ -123,7 +123,7 @@ def property_grammar(): Word(nums + ':')('VALUE') ] - grammar = Or(fixed_props + kbd_props + abs_props) + grammar = Or(fixed_props + kbd_props + abs_props) + EOL return grammar -- cgit v1.2.3-54-g00ecf