Skip to content

Commit 7d3dabf

Browse files
freyesLiam Young
authored andcommitted
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. yaml/pyyaml#561 Closes-Bug: #1951650
1 parent 1f98cbc commit 7d3dabf

File tree

1 file changed

+1
-1
lines changed
  • zaza/openstack/charm_tests/neutron

1 file changed

+1
-1
lines changed

zaza/openstack/charm_tests/neutron/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def _assert_result_match(self, action_result, resource_list,
285285

286286
# extract data from juju action
287287
action_data = action_result.data.get('results', {}).get(resource_name)
288-
resources_from_action = yaml.load(action_data)
288+
resources_from_action = yaml.safe_load(action_data)
289289

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

0 commit comments

Comments
 (0)