From 29b569df13c84ca5c6ce8bcf727aafe00c51a247 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 96b45de..b3c8906 100644 --- a/zaza/openstack/charm_tests/neutron/tests.py +++ b/zaza/openstack/charm_tests/neutron/tests.py @@ -285,7 +285,7 @@ class NeutronGatewayShowActionsTest(test_utils.OpenStackBaseTest): # 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}