Skip to content

Commit b8135cb

Browse files
committed
Replace deprecated method
1 parent ad8a187 commit b8135cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mkdocs_redirects/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ def on_files(self, files, config, **kwargs):
105105

106106
# SHIM! Produce a warning if the old root-level 'redirects' config is present
107107
if config.get('redirects'):
108-
log.warn(
108+
log.warning(
109109
"The root-level 'redirects:' setting is not valid and has been changed in version 1.0! "
110110
"The plugin-level 'redirect-map' must be used instead. See https://git.io/fjdBN"
111111
)
112112

113113
# Validate user-provided redirect "old files"
114114
for page_old in self.redirects.keys():
115115
if not utils.is_markdown_file(page_old):
116-
log.warn("redirects plugin: '%s' is not a valid markdown file!", page_old)
116+
log.warning("redirects plugin: '%s' is not a valid markdown file!", page_old)
117117

118118
# Build a dict of known document pages to validate against later
119119
self.doc_pages = {}
@@ -141,7 +141,7 @@ def on_post_build(self, config, **kwargs):
141141
# If the redirect target isn't external or a valid internal page, throw an error
142142
# Note: we use 'warn' here specifically; mkdocs treats warnings specially when in strict mode
143143
else:
144-
log.warn("Redirect target '%s' does not exist!", page_new)
144+
log.warning("Redirect target '%s' does not exist!", page_new)
145145
continue
146146

147147
# DO IT!

0 commit comments

Comments
 (0)