Skip to content

Commit 6061deb

Browse files
JordanYateskartben
authored andcommitted
doc: gen_boards_catalog: fix crash for OOT boards
Fix a crash when `list_boards.find_v2_boards` finds boards not under `ZEPHYR_BASE`. Signed-off-by: Jordan Yates <[email protected]>
1 parent 970460e commit 6061deb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/_scripts/gen_boards_catalog.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,15 @@ def get_catalog(generate_hw_features=False):
361361
except Exception as e:
362362
logger.error(f"Error parsing twister file {twister_file}: {e}")
363363

364+
if doc_page and doc_page.is_relative_to(ZEPHYR_BASE):
365+
doc_page_path = doc_page.relative_to(ZEPHYR_BASE).as_posix()
366+
else:
367+
doc_page_path = None
368+
364369
board_catalog[board.name] = {
365370
"name": board.name,
366371
"full_name": full_name,
367-
"doc_page": doc_page.relative_to(ZEPHYR_BASE).as_posix() if doc_page else None,
372+
"doc_page": doc_page_path,
368373
"vendor": vendor,
369374
"archs": list(archs),
370375
"socs": list(socs),

0 commit comments

Comments
 (0)