From 39d94ba90fe4cdb074f71095b8d345247cec653d Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Tue, 17 Sep 2024 11:44:31 +0100 Subject: [PATCH] Support tests.yaml bundles defined as None Some tests.yaml files have bundles set to None so we need to protect against this. --- openstack/tools/func_test_tools/identify_charm_func_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack/tools/func_test_tools/identify_charm_func_tests.py b/openstack/tools/func_test_tools/identify_charm_func_tests.py index 2ae65c6..95bd6d9 100644 --- a/openstack/tools/func_test_tools/identify_charm_func_tests.py +++ b/openstack/tools/func_test_tools/identify_charm_func_tests.py @@ -20,7 +20,7 @@ def extract_targets(bundle_list): value so this accounts for both formats. """ extracted = [] - for item in bundle_list: + for item in bundle_list or []: if isinstance(item, dict): extracted.append(list(item.values())[0]) else: