[INSTRM-1466] use safe_load() to read a yaml file Created: 20/Nov/21 Updated: 31/Oct/23 Resolved: 31/Oct/23 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | ics_cobraCharmer |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Normal |
| Reporter: | monodera | Assignee: | cloomis |
| Resolution: | Done | Votes: | 0 |
| Labels: | EngRun | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I needed to edit a file in ics_cobraCharmer as follows to load a yaml file with PyYAML.
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 |
| Comments |
| Comment by chihyi [ 08/Dec/21 ] |
|
Craig is the person who wrote the butler module. He should know better than me about how to handle this issue. |
| Comment by monodera [ 30/Oct/23 ] |
|
I made a PR. It would be great if you could have a look.
|
| Comment by monodera [ 31/Oct/23 ] |
|
Merged to master
|