YAML: use Loaders and safe_load (#11910)

This commit is contained in:
Alexis Paques
2019-07-10 15:15:29 +02:00
committed by Beat Küng
parent 6da8ce94f1
commit 453ecfeb55
3 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ verbose = args.verbose
def load_yaml_file(file_name):
with open(file_name, 'r') as stream:
try:
return yaml.load(stream)
return yaml.safe_load(stream)
except yaml.YAMLError as exc:
print(exc)
raise