Skip to content

Commit

Permalink
Use yaml.safe_load instead of yaml.load in `check-event-schema-exampl…
Browse files Browse the repository at this point in the history
…es.py` (#3716)
  • Loading branch information
anoadragon453 committed Feb 9, 2022
1 parent d06f055 commit 0d634b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/check-event-schema-examples.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0d634b1

Please sign in to comment.