Resolve Python Logger warnings
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
parent
fd28576bcc
commit
0f6d71ac09
2 changed files with 3 additions and 3 deletions
4
conf.py
4
conf.py
|
|
@ -434,11 +434,11 @@ def generate_redirects(app):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
|
if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
|
||||||
logging.warn(
|
logging.warning(
|
||||||
"The 'sphinxcontib-redirects' plugin is only supported "
|
"The 'sphinxcontib-redirects' plugin is only supported "
|
||||||
"by the 'html' builder and subclasses. Skipping..."
|
"by the 'html' builder and subclasses. Skipping..."
|
||||||
)
|
)
|
||||||
logging.warn(f"Builder is {app.builder.name} ({type(app.builder)})")
|
logging.warning(f"Builder is {app.builder.name} ({type(app.builder)})")
|
||||||
return
|
return
|
||||||
|
|
||||||
with open(path) as redirects:
|
with open(path) as redirects:
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ if _last_build_times.exists():
|
||||||
LAST_BUILD_TIMES = json.load(f)
|
LAST_BUILD_TIMES = json.load(f)
|
||||||
logger.info("Build times loaded.")
|
logger.info("Build times loaded.")
|
||||||
else:
|
else:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"No last build times found. This is normal if you're running this for the first time."
|
"No last build times found. This is normal if you're running this for the first time."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue