From: Erik Faye-Lund Date: Fri, 6 Oct 2023 08:05:45 +0000 (+0200) Subject: docs: fix linkcheck X-Git-Tag: upstream/23.3.3~1173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5c2139ce4483cb1c224e068644ffb97772da48b;p=platform%2Fupstream%2Fmesa.git 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 Part-of: --- diff --git a/docs/_exts/bootstrap.py b/docs/_exts/bootstrap.py index e7239a6..bb0e595 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",