Skip to content
Permalink
Browse files

add the safe loader as the loader in the call to yaml.load

  • Loading branch information...
Michael Cuffaro
Michael Cuffaro committed Mar 25, 2019
1 parent f0e6696 commit a52c99024f9cea81a2e2de44789408939d5cb542
Showing with 1 addition and 1 deletion.
  1. +1 −1 tools/translate_yaml.py
@@ -104,7 +104,7 @@
def load_and_validate(yamlname, schema):
try:
yamlfile = open(yamlname)
yamldoc = yaml.load(yamlfile)
yamldoc = yaml.load(yamlfile, Loader=yaml.SafeLoader)
jsonschema.validate(yamldoc, schema)
except (FileNotFoundError, IsADirectoryError, yaml.YAMLError) as e:
print(e, file=sys.stderr)

0 comments on commit a52c990

Please sign in to comment.
You can’t perform that action at this time.