Skip to content

Commit 5ce3020

Browse files
committed
Use yaml.safe_load()
1 parent 66ce401 commit 5ce3020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

feature-decoding/featdec_fastl2lir_train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ def main(conf):
101101
info_file = os.path.join(results_dir, 'info.yaml')
102102
if os.path.exists(info_file):
103103
with open(info_file, 'r') as f:
104-
info = yaml.load(f)
104+
info = yaml.safe_load(f)
105105
while info is None:
106106
warnings.warn('Failed to load info from %s. Retrying...'
107107
% info_file)
108108
with open(info_file, 'r') as f:
109-
info = yaml.load(f)
109+
info = yaml.safe_load(f)
110110
if '_status' in info and 'computation_status' in info['_status']:
111111
if info['_status']['computation_status'] == 'done':
112112
print('%s is already done and skipped' % analysis_id)

0 commit comments

Comments
 (0)