Skip to content

Commit ef29f7a

Browse files
committed
scripts: dts: gen_driver_kconfig_dts: Skip empty yaml files
The YAML parsing will currently return a None-type if no input data is empty, and the subsequent check for a substring will cause an exception. Signed-off-by: Allan Norgaard <[email protected]>
1 parent 1a5676d commit ef29f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/dts/gen_driver_kconfig_dts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def main():
8080
print(f"WARNING: '{binding_path}' appears in binding "
8181
f"directories but isn't valid YAML: {e}")
8282
continue
83-
if 'compatible' not in raw:
83+
if raw is None or 'compatible' not in raw:
8484
continue
8585

8686
compat_list.append(raw['compatible'])

0 commit comments

Comments
 (0)