scripts: shields: handle BOARD_ROOT not containing shields folder
Prevent list_shields.py from crashing if a provided BOARD_ROOT does not contain a shields folder. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
parent
84980e0f4b
commit
93ced043f5
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ def find_shields_in(root):
|
|||
shields = root / 'boards' / 'shields'
|
||||
ret = []
|
||||
|
||||
if not shields.exists():
|
||||
return ret
|
||||
|
||||
for maybe_shield in (shields).iterdir():
|
||||
if not maybe_shield.is_dir():
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue