Merge "Add notdir implementation"
diff --git a/core/product_config.rbc b/core/product_config.rbc
index e1e59c2..c32db76 100644
--- a/core/product_config.rbc
+++ b/core/product_config.rbc
@@ -30,7 +30,6 @@
globals[k] = getattr(rblf_cli, k)
globals.setdefault("PRODUCT_SOONG_NAMESPACES", [])
- globals.setdefault(_soong_config_namespaces_key, {})
_envsetup_init(globals, version_info)
# Variables that should be defined.
@@ -299,10 +298,11 @@
def _soong_config_namespace(g, nsname):
"""Adds given namespace if it does not exist."""
- if g[_soong_config_namespaces_key].get(nsname):
+ old = g.get(_soong_config_namespaces_key, {})
+ if old.get(nsname):
return
+
# A value cannot be updated, so we need to create a new dictionary
- old = g[_soong_config_namespaces_key]
g[_soong_config_namespaces_key] = dict([(k,v) for k,v in old.items()] + [(nsname, {})])
def _soong_config_set(g, nsname, var, value):