From 9386baac2c29c54f93961d9f81aa259c7799c86e Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Mon, 22 Nov 2021 10:37:06 -0300 Subject: [PATCH] Use yaml.safe_load() Pyyaml>=6.0 requires to pass the Loader arg to yaml.load(), switching to yaml.safe_load() recovers the old and expected behavior. https://github.com/yaml/pyyaml/pull/561 Closes-Bug: #1951650 --- zaza/openstack/charm_tests/neutron/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/neutron/tests.py b/zaza/openstack/charm_tests/neutron/tests.py index 96b45deaf..b3c890641 100644 --- a/zaza/openstack/charm_tests/neutron/tests.py +++ b/zaza/openstack/charm_tests/neutron/tests.py @@ -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}