mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
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:
parent
d16759fda5
commit
4b2dc2f8ec
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user