summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-06-26 15:23:42 -0500
committerJeff Epler <jepler@gmail.com>2020-06-26 15:23:42 -0500
commit56367b197bdf8b6d4adced23b128fb45d17fbd27 (patch)
tree65854f46a006908067903565141468916f51ff16
parent844f575a90630fa75f37abf0c089e638f98ec54e (diff)
docs: conf.py: Fix redirects for RTD
-rw-r--r--conf.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/conf.py b/conf.py
index 38546a5d0..8e4fbb23b 100644
--- a/conf.py
+++ b/conf.py
@@ -391,12 +391,13 @@ TEMPLATE = """<html>
def generate_redirects(app):
path = os.path.join(app.srcdir, app.config.redirects_file)
if not os.path.exists(path):
- app.info("Could not find redirects file at '%s'" % path)
+ logging.info("Could not find redirects file at '%s'" % path)
return
- if not type(app.builder) == builders.StandaloneHTMLBuilder:
+ logging.warn(f"Builder is {app.builder.name} ({type(app.builder)})")
+ if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
logging.warn("The 'sphinxcontib-redirects' plugin is only supported "
- "by the 'html' builder. Skipping...")
+ "by the 'html' builder and subclasses. Skipping...")
return
with open(path) as redirects: