Skip to content

Commit

Permalink
Specify yaml loader when loading mkdoc toc (#487)
Browse files Browse the repository at this point in the history
The following warning was thrown on CI build:

    ./scripts/validate_mkdocs.py:40: YAMLLoadWarning: calling
    yaml.load_all() without Loader=... is deprecated, as the default
    Loader is unsafe. Please read https://msg.pyyaml.org/load for full
    details.

Following the deprecation guide, this update simply specifies a
Loader= parameter when loading the mkdoc toc.
  • Loading branch information
joristirado authored and jamesaimonetti committed Oct 30, 2019
1 parent 2cc2320 commit d6154cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/validate_mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def parse_page(errors_detected, page):
return errors_detected

stream = open("docs/mkdocs/mkdocs.yml", 'r')
mkdocs = yaml.load_all(stream)
mkdocs = yaml.load_all(stream, Loader=yaml.SafeLoader)
errors_detected = False

for doc in mkdocs:
Expand Down

0 comments on commit d6154cc

Please sign in to comment.