From 0d634b193589c4de3202bacdd886135698eec5af Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Wed, 9 Feb 2022 10:51:56 +0000 Subject: [PATCH] Use yaml.safe_load instead of yaml.load in `check-event-schema-examples.py` (#3716) --- scripts/check-event-schema-examples.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-event-schema-examples.py b/scripts/check-event-schema-examples.py index 0eca7abf..e5261c87 100755 --- a/scripts/check-event-schema-examples.py +++ b/scripts/check-event-schema-examples.py @@ -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