summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/data_smart.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 7de90056d..17a642ee2 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -150,7 +150,7 @@ class DataSmart(MutableMapping):
for var in vars:
name = var[:-l]
try:
- self[name] = self[var]
+ self.setVar(name, self.getVar(var, False))
except Exception:
logger.info("Untracked delVar")
@@ -366,7 +366,11 @@ class DataSmart(MutableMapping):
return len(frozenset(self))
def __getitem__(self, item):
- return self.getVar(item, False)
+ value = self.getVar(item, False)
+ if value is None:
+ raise KeyError(item)
+ else:
+ return value
def __setitem__(self, var, value):
self.setVar(var, value)