Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f4692bf authored by Cole Faust's avatar Cole Faust
Browse files

Don't assume _soong_config_namespaces_key is present

The board configuration doesn't use init_globals(),
which is where _soong_config_namespaces_key normally
is set. Just assume empty dictionaries in
soong_config_namespace where appropriate.

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -b armv8-userdebug
Change-Id: I5f1e52fa0bdde32bff0e8db54861557dcb327190
parent 629ca867
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ def _init_globals(version_info):
        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 _indirect(pcm_name):
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):