Replace deprecated yaml.load() with yaml.safe_load() (#1199)

Closes #1198

Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
This commit is contained in:
ddj116 2021-11-02 09:47:55 -05:00 committed by GitHub
parent d16759fda5
commit 4b2dc2f8ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,12 +238,12 @@ class TrickWorkflow(WorkflowCommon):
Returns
-------
dict or None
dictionary representation of YAML content as parsed by yaml.load()
dictionary representation of YAML content as parsed by yaml.safe_load()
or None if parsing failed
"""
try:
with open(config_file) as file:
y = yaml.load(file)
y = yaml.safe_load(file)
return y
except Exception as e:
tprint("Unable to parse config file: %s\nERROR: %s" % (config_file,e), 'DARK_RED')