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 <allannk@gmail.com>
This commit is contained in:
parent
2e4d8761be
commit
23cacb3766
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ def main():
|
||||||
print(f"WARNING: '{binding_path}' appears in binding "
|
print(f"WARNING: '{binding_path}' appears in binding "
|
||||||
f"directories but isn't valid YAML: {e}")
|
f"directories but isn't valid YAML: {e}")
|
||||||
continue
|
continue
|
||||||
if 'compatible' not in raw:
|
if raw is None or 'compatible' not in raw:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
compat_list.append(raw['compatible'])
|
compat_list.append(raw['compatible'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue