summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2021-04-22 13:46:41 +0200
committerEric Engestrom <eric@engestrom.ch>2021-05-12 21:37:10 +0200
commitceafcf3daf20763795bda6a9f166443bd84b7bf4 (patch)
tree7d27fc7703c2962548ae90e73873a0c7c76354bc /docs
parentdb3c2cdf824bba166c453743b2892274a4e8a0e3 (diff)
docs: do not generate redirects on error
The build-finished event is also triggered when there's an error. I somehow got the second argument wrong, and ended up ignoring the case. This can lead to new exceptions being thrown due to missing files, that ends up hiding the real problem. Fixes: 64a4ba9e1ce ("docs: add an extension to generate redirects") Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10407> (cherry picked from commit 2736370294427d87933ce7ae293e0465fbab77e2)
Diffstat (limited to 'docs')
-rw-r--r--docs/_exts/redirects.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/_exts/redirects.py b/docs/_exts/redirects.py
index 90d69efee5f..1adf3cdb8ab 100644
--- a/docs/_exts/redirects.py
+++ b/docs/_exts/redirects.py
@@ -6,8 +6,8 @@ def create_redirect(dst):
tpl = '<html><head><meta http-equiv="refresh" content="0; url={0}"><script>window.location.replace("{0}")</script></head></html>'
return tpl.format(dst)
-def create_redirects(app, docname):
- if not app.builder.name == 'html':
+def create_redirects(app, exception):
+ if exception is not None or not app.builder.name == 'html':
return
for src, dst in app.config.html_redirects:
path = os.path.join(app.outdir, '{0}.html'.format(src))