-
Type: Task
-
Status: Done (View Workflow)
-
Priority: Normal
-
Resolution: Done
-
Component/s: ics_cobraCharmer
-
Labels:
I needed to edit a file in ics_cobraCharmer as follows to load a yaml file with PyYAML.
— ics_cobraCharmer/python/ics/cobraCharmer/utils/orig.butler.py 2021-11-19 17:01:27.507710048 -1000
+++ ics_cobraCharmer/python/ics/cobraCharmer/utils/butler.py 2021-11-19 17:03:45.186142846 -1000
@@ -230,7 +230,7 @@
"""
yamlPath = configPathForPfi(version=version, rootDir=rootDir)
with open(yamlPath, mode='rt') as yamlFile:
- config = yaml.load(yamlFile)
+ config = yaml.safe_load(yamlFile)
return [c.strip() for c in config['modules']]
I think this is due to an additional requirement for PyYAML 5.1+. The above modification is the easist one, but there are various ways to specify a loader explicitly in their web site.
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation