Use yaml.safe_load instead of yaml.load in check-event-schema-examples.py
(#3716)
This commit is contained in:
parent
d06f05571f
commit
0d634b1935
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ def load_file(path):
|
|||
else:
|
||||
# We have to assume it's YAML because some of the YAML examples
|
||||
# do not have file extensions.
|
||||
return yaml.load(f)
|
||||
return yaml.safe_load(f)
|
||||
|
||||
|
||||
def resolve_references(path, schema):
|
||||
|
@ -84,7 +84,7 @@ def check_example_file(examplepath, schemapath):
|
|||
example = resolve_references(examplepath, json.load(f))
|
||||
|
||||
with open(schemapath) as f:
|
||||
schema = yaml.load(f)
|
||||
schema = yaml.safe_load(f)
|
||||
|
||||
fileurl = "file://" + os.path.abspath(schemapath)
|
||||
schema["id"] = fileurl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue