Call rblf.setDefault() when appending to a variable without +=

Bug: 222737841
Test: go test
Change-Id: I10e9e994fb1979e2e06ad30bbe66a21657d1e3db
This commit is contained in:
Cole Faust
2022-03-04 12:04:31 -08:00
parent fc74246c98
commit 816e080c4d
2 changed files with 22 additions and 8 deletions

View File

@@ -985,6 +985,7 @@ endif
def init(g, handle):
cfg = rblf.cfg(handle)
if "hwaddress" not in cfg.get("PRODUCT_PACKAGES", []):
rblf.setdefault(handle, "PRODUCT_PACKAGES")
cfg["PRODUCT_PACKAGES"] = (rblf.mkstrip("%s hwaddress" % " ".join(cfg.get("PRODUCT_PACKAGES", [])))).split()
`,
},