aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/persist_data.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-04-04 09:36:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-06 15:49:17 +0100
commit7fc020aa15d918b215575576d91160afae7f4d70 (patch)
treeed9b029c8b2dfd355396de9183517e852333612b /bitbake/lib/bb/persist_data.py
parentfc801b907361cfdb7e329eefac7a0c991e86c736 (diff)
downloadopenembedded-core-contrib-7fc020aa15d918b215575576d91160afae7f4d70.tar.gz
persist_data: raise KeyError on missing elements
(Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r--bitbake/lib/bb/persist_data.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index f51a42efd2..eae64cf792 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -69,8 +69,11 @@ class SQLTable(collections.MutableMapping):
self.table, [key])
for row in data:
return row[1]
+ raise KeyError(key)
def __delitem__(self, key):
+ if key not in self:
+ raise KeyError(key)
self._execute("DELETE from %s where key=?;" % self.table, [key])
def __setitem__(self, key, value):