Replace yaml.load with yaml.safe_load #644
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I promised to have a look at this safe_load issue, today I have been cracking my head to try and figure out why safe_load doesn't seem to work as expected. I made some changes to the code (added
yaml.SafeLoader.add_constructor
to the!include
constructor) but when the change was implemented on the ENVVARs the test failed no matter what I tried.I'm raising this PR to ask for help. I tried to google and go around but seems that pyyaml is a mysterious beast, or at least safe_load is. I can't figure out why the envvar constructor is failing - mainly what happens is that the environmental variable isn't translated from the pattern
$ENVVAR
. The test fails because the value it expected to get wastest
and instead it got$ENVVAR
.Not sure how to go tackle this issue. Perhaps the whole envvar function needs to be changed into something else?
Fixes #580
Status
READY| UNDER DEVELOPMENT |ON HOLDType of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Checklist: