diff options
authorErik Faye-Lund <>2021-04-22 13:46:41 +0200
committerMarge Bot <>2021-05-05 09:37:18 +0000
commit2736370294427d87933ce7ae293e0465fbab77e2 (patch)
parent5a1675a03030c68f2f4b27f1a687b56762e4190a (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 <> Part-of: <>
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/_exts/ b/docs/_exts/
index 90d69efee5f..1adf3cdb8ab 100644
--- a/docs/_exts/
+++ b/docs/_exts/
@@ -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 == 'html':
+def create_redirects(app, exception):
+ if exception is not None or not == 'html':
for src, dst in app.config.html_redirects:
path = os.path.join(app.outdir, '{0}.html'.format(src))