From: richard Date: Mon, 12 Jul 2010 04:02:25 +0000 (+0000) Subject: memorydb API consistency fix X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b688e503665c114ef4bca19729d250b46bf345c3;p=roundup.git memorydb API consistency fix git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4495 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/test/memorydb.py b/test/memorydb.py index 2bbddab..cd830cb 100644 --- a/test/memorydb.py +++ b/test/memorydb.py @@ -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)