Skip to content

Commit 0d634b1

Browse files
Use yaml.safe_load instead of yaml.load in check-event-schema-examples.py (matrix-org#3716)
1 parent d06f055 commit 0d634b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/check-event-schema-examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def load_file(path):
5555
else:
5656
# We have to assume it's YAML because some of the YAML examples
5757
# do not have file extensions.
58-
return yaml.load(f)
58+
return yaml.safe_load(f)
5959

6060

6161
def resolve_references(path, schema):
@@ -84,7 +84,7 @@ def check_example_file(examplepath, schemapath):
8484
example = resolve_references(examplepath, json.load(f))
8585

8686
with open(schemapath) as f:
87-
schema = yaml.load(f)
87+
schema = yaml.safe_load(f)
8888

8989
fileurl = "file://" + os.path.abspath(schemapath)
9090
schema["id"] = fileurl

0 commit comments

Comments
 (0)