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 2b7ad42 commit 87f194c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zaza/openstack/charm_tests/neutron/tests.py
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 87f194c

Please sign in to comment.