Unverified Commit 0e8a9f82 authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Merge pull request #3311 from 418sec/1-pip-nni

parents 4784cc6c ea3bebab
...@@ -21,7 +21,7 @@ def get_yml_content(file_path): ...@@ -21,7 +21,7 @@ def get_yml_content(file_path):
'''Load yaml file content''' '''Load yaml file content'''
try: try:
with open(file_path, 'r') as file: with open(file_path, 'r') as file:
return yaml.load(file, Loader=yaml.Loader) return yaml.load(file, Loader=yaml.SafeLoader)
except yaml.scanner.ScannerError as err: except yaml.scanner.ScannerError as err:
print_error('yaml file format error!') print_error('yaml file format error!')
print_error(err) print_error(err)
......
...@@ -216,7 +216,7 @@ def read_registerd_algo_meta(): ...@@ -216,7 +216,7 @@ def read_registerd_algo_meta():
config_file = get_registered_algo_config_path() config_file = get_registered_algo_config_path()
if os.path.exists(config_file): if os.path.exists(config_file):
with open(config_file, 'r') as f: with open(config_file, 'r') as f:
config = yaml.load(f, Loader=yaml.Loader) config = yaml.load(f, Loader=yaml.SafeLoader)
else: else:
config = defaultdict(list) config = defaultdict(list)
for t in ALGO_TYPES: for t in ALGO_TYPES:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment