Skip to content

Commit

Permalink
Use yaml.safe_load()
Browse files Browse the repository at this point in the history
Pyyaml>=6.0 requires to pass the Loader arg to yaml.load(), switching to
yaml.safe_load() recovers the old and expected behavior.

yaml/pyyaml#561

Closes-Bug: #1951650
  • Loading branch information
freyes authored and Liam Young committed Mar 25, 2022
1 parent 20fcffe commit 5b7d244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zaza/openstack/charm_tests/neutron/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def _assert_result_match(self, action_result, resource_list,

# extract data from juju action
action_data = action_result.data.get('results', {}).get(resource_name)
resources_from_action = yaml.load(action_data)
resources_from_action = yaml.safe_load(action_data)

# pull resource IDs from expected resource list and juju action data
expected_resource_ids = {resource['id'] for resource in resource_list}
Expand Down

0 comments on commit 5b7d244

Please sign in to comment.