Skip to content

Commit b5c2878

Browse files
committed
specify YAML loader
Co-authored-by: Daniel McCloy <[email protected]>c
1 parent a0c0681 commit b5c2878

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def split_metadata(path, text):
144144
metadata_raw = pieces[1]
145145
text = pieces[2]
146146
try:
147-
metadata_yaml = yaml.load(metadata_raw, Loader=yaml.FullLoader)
147+
metadata_yaml = yaml.load(metadata_raw, Loader=yaml.SafeLoader)
148148
except yaml.YAMLError as e:
149149
print('Unable to parse YAML header in {0}:\n{1}'.format(
150150
path, e), file=sys.stderr)
@@ -161,7 +161,7 @@ def load_yaml(filename):
161161

162162
try:
163163
with open(filename, 'r') as reader:
164-
return yaml.load(reader, Loader=yaml.FullLoader)
164+
return yaml.load(reader, Loader=yaml.SafeLoader)
165165
except (yaml.YAMLError, IOError) as e:
166166
print('Unable to load YAML file {0}:\n{1}'.format(
167167
filename, e), file=sys.stderr)

0 commit comments

Comments
 (0)