From: beierlm Date: Mon, 29 Mar 2021 20:03:37 +0000 (-0400) Subject: Proceed if no day 1 2 X-Git-Tag: v9.0.0-dev~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c27c98a9cd08703d7e9b9aefdf6cf961a3b73f5a;p=osm%2Fosmclient.git Proceed if no day 1 2 Fixed bug where nf package build would fail if there are no day1-2 primitives found. Change-Id: I171e79683ad43537dc851ac05b8fb40f35cef903 Signed-off-by: beierlm --- diff --git a/osmclient/common/package_tool.py b/osmclient/common/package_tool.py index e3dbd1a..3dedccd 100644 --- a/osmclient/common/package_tool.py +++ b/osmclient/common/package_tool.py @@ -792,11 +792,12 @@ class PackageTool(object): .get("operate-vnf-op-config", {}) .get("day1-2") ) - for day_1_2 in day_1_2s: - exec_env_list = day_1_2.get("execution-environment-list", []) - for exec_env in exec_env_list: - if "juju" in exec_env and "charm" in exec_env["juju"]: - charms_list.append(exec_env["juju"]["charm"]) + if day_1_2s is not None: + for day_1_2 in day_1_2s: + exec_env_list = day_1_2.get("execution-environment-list", []) + for exec_env in exec_env_list: + if "juju" in exec_env and "charm" in exec_env["juju"]: + charms_list.append(exec_env["juju"]["charm"]) return charms_list def _charms_search_on_nsd_sol006_dict(self, sol006_dict):