fix: YAMLLoadWarning by specify yaml loader

This commit is contained in:
debugtalk
2019-06-25 20:56:09 +08:00
parent 40843a8a31
commit 46b6336af9
2 changed files with 2 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
- fix extend with testcase reference in format version 2
- fix ImportError when locustio is not installed
- fix YAMLLoadWarning by specify yaml loader
## 2.2.0 (2019-06-24)

View File

@@ -35,7 +35,7 @@ def load_yaml_file(yaml_file):
""" load yaml file and check file content format
"""
with io.open(yaml_file, 'r', encoding='utf-8') as stream:
yaml_content = yaml.load(stream)
yaml_content = yaml.load(stream, Loader=yaml.FullLoader)
_check_format(yaml_file, yaml_content)
return yaml_content