]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "parse_hwdb: enforce the ":*" suffix"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 Nov 2020 13:26:51 +0000 (14:26 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 Nov 2020 13:26:51 +0000 (14:26 +0100)
This reverts commit ad2d8e61eeab27f3e36572c7981362227357f420.

hwdb.d/parse_hwdb.py

index 4174c7598ffb9cb86d25ed5854d57b516b4aafeb..ed07224b3ccb8fcd559a74d33d9a7a79c5f3416b 100755 (executable)
@@ -202,9 +202,8 @@ def check_matches(groups):
             except ParseBaseException as e:
                 error('Pattern {!r} is invalid: {}', rest, e)
                 continue
-
-        if not rest.endswith(':*'):
-            error("pattern {!r} does not end with ':*'", match)
+            if rest[-1] not in '*:':
+                error('pattern {} does not end with "*" or ":"', match)
 
     matches.sort()
     prev = None