Fix KSU creation/update when custom_env_vars is None
Change-Id: I23f70d3cab172a11de084a48635ed0e9787bfd10
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_lcm/odu_libs/ksu.py b/osm_lcm/odu_libs/ksu.py
index 325ec5f..e7c2f82 100644
--- a/osm_lcm/odu_libs/ksu.py
+++ b/osm_lcm/odu_libs/ksu.py
@@ -67,6 +67,8 @@
target_ns = oka_params.get("namespace", "default")
substitute_environment = oka_params.get("substitute_environment", "true").lower()
custom_env_vars = oka_params.get("custom_env_vars", {})
+ if custom_env_vars is None:
+ custom_env_vars = {}
if "APPNAME" not in custom_env_vars:
custom_env_vars["APPNAME"] = ksu_name
if "TARGET_NS" not in custom_env_vars:
@@ -218,6 +220,8 @@
target_ns = oka_params.get("namespace", "default")
substitute_environment = oka_params.get("substitute_environment", "true").lower()
custom_env_vars = oka_params.get("custom_env_vars", {})
+ if custom_env_vars is None:
+ custom_env_vars = {}
if "APPNAME" not in custom_env_vars:
custom_env_vars["APPNAME"] = ksu_name
if "TARGET_NS" not in custom_env_vars: