10000 docs: conf.py: Fix redirects for RTD · ehershey/circuitpython@56367b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56367b1

Browse files
committed
docs: conf.py: Fix redirects for RTD
1 parent 844f575 commit 56367b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,13 @@
391391
def generate_redirects(app):
392392
path = os.path.join(app.srcdir, app.config.redirects_file)
393393
if not os.path.exists(path):
394-
app.info("Could not find redirects file at '%s'" % path)
394+
logging.info("Could not find redirects file at '%s'" % path)
395395
return
396396

397-
if not type(app.builder) == builders.StandaloneHTMLBuilder:
397+
logging.warn(f"Builder is {app.builder.name} ({type(app.builder)})")
398+
if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
398399
logging.warn("The 'sphinxcontib-redirects' plugin is only supported "
399-
"by the 'html' builder. Skipping...")
400+
"by the 'html' builder and subclasses. Skipping...")
400401
return
401402

402403
with open(path) as redirects:

0 commit comments

Comments
 (0)
0