Module: Mesa Branch: main Commit: d5c2139ce4483cb1c224e068644ffb97772da48b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5c2139ce4483cb1c224e068644ffb97772da48b
Author: Erik Faye-Lund <[email protected]> Date: Fri Oct 6 10:05:45 2023 +0200 docs: fix linkcheck When running with the linkcheck builder, app.builder.default_translator_class is None, making us throw an exception and give up. We don't need the bootstrap extension in this case, so just do nothing instead. Fixes: f72033bb707 ("docs: add bootstrap extension") Reviewed-by: Corentin Noël <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25585> --- docs/_exts/bootstrap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/_exts/bootstrap.py b/docs/_exts/bootstrap.py index e7239a6a45a..bb0e595c4d1 100644 --- a/docs/_exts/bootstrap.py +++ b/docs/_exts/bootstrap.py @@ -96,6 +96,9 @@ class BootstrapHTML5TranslatorMixin: self.body.append(tag) def setup_translators(app): + if app.builder.default_translator_class is None: + return + if not app.registry.translators.items(): translator = types.new_class( "BootstrapHTML5Translator",
