diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py index 4174c7598f..ed07224b3c 100755 --- a/hwdb.d/parse_hwdb.py +++ b/hwdb.d/parse_hwdb.py @@ -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