Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yaml.safe_load instead of yaml.load in check-event-schema-examples.py #3716

Merged
merged 1 commit into from Feb 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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