Raise the proper exception.

This commit is contained in:
Jeremy Fincher 2004-11-30 04:42:20 +00:00
parent 62b5dd8120
commit 54b56a8a53
1 changed files with 4 additions and 1 deletions

View File

@ -237,7 +237,10 @@ class CdbMapping(MappingInterface):
return i
def get(self, id):
return self.db[str(id)]
try:
return self.db[str(id)]
except KeyError:
raise NoRecordError, id
# XXX Same as above.
def set(self, id, s):