Skip to content

Commit 35d9645

Browse files
[nrf fromlist] doc: extensions: link-roles: missing module not critical
External projects building the documentation may not clone all modules, as they have manifest filtering. Therefore, not having access to a module should not produce a fatal documentation build error. Convert the error to a debug log, so it is at least traced. Upstream PR: zephyrproject-rtos/zephyr#78876 Signed-off-by: Gerard Marull-Paretas <[email protected]> Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 81aef0d commit 35d9645

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/_extensions/zephyr/link-roles.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import re
1010
import subprocess
1111
from docutils import nodes
12+
from sphinx.util import logging
1213

1314
try:
1415
import west.manifest
@@ -21,6 +22,9 @@
2122
west_manifest = None
2223

2324

25+
logger = logging.getLogger(__name__)
26+
27+
2428
def get_github_rev():
2529
try:
2630
output = subprocess.check_output(
@@ -88,9 +92,7 @@ def role(name, rawtext, text, lineno, inliner, options={}, content=[]):
8892
)
8993
# Invalid module provided
9094
elif module != config.link_roles_manifest_project:
91-
raise ModuleNotFoundError(
92-
f"Module {module} not found in the west manifest\n\t{trace}"
93-
)
95+
logger.debug(f"Module {module} not found in the west manifest")
9496
# Baseurl for manifest project not set
9597
elif baseurl is None:
9698
raise ValueError(

0 commit comments

Comments
 (0)