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:
Benjamin Cabé 2025-05-21 17:05:41 +02:00 committed by Benjamin Cabé
commit 93ced043f5

View file

@ -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