Code

memorydb API consistency fix
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 12 Jul 2010 04:02:25 +0000 (04:02 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 12 Jul 2010 04:02:25 +0000 (04:02 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4495 57a73879-2fb5-44c3-a270-3262357dd7e2

test/memorydb.py

index 2bbddabf511c403f76805234e87ce2bf80c863e0..cd830cbd8acee32bbbe307c25cc7c959da535ddd 100644 (file)
@@ -118,6 +118,8 @@ class BasicDatabase(dict):
     def get(self, infoid, value, default=None):
         return self[infoid].get(value, default)
     def getall(self, infoid):
+        if infoid not in self:
+            raise KeyError(infoid)
         return self[infoid]
     def set(self, infoid, **newvalues):
         self[infoid].update(newvalues)