Fix NoneType error

This commit is contained in:
alexdevteam 2022-04-24 14:23:11 +02:00 committed by Emilio Cobos Álvarez
parent bbffd83f03
commit 92487d4ed4

View File

@ -219,7 +219,7 @@ def run_bindgen(args, bindings):
if not args.expect_bindgen_fail and child.returncode != 0:
exit_1("Error: running `bindgen` failed", child)
for arg in args.bindings_grep:
for arg in args.bindings_grep or []:
pattern = regexp(arg)
with open(bindings, mode="r") as f:
if not contains(pattern, f):