|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -#$Id: back_anydbm.py,v 1.36 2002-06-19 03:07:19 richard Exp $ |
| 18 | +#$Id: back_anydbm.py,v 1.37 2002-06-20 23:52:35 richard Exp $ |
19 | 19 | ''' |
20 | 20 | This module defines a backend that saves the hyperdatabase in a database |
21 | 21 | chosen by anydbm. It is guaranteed to always be available in python |
@@ -335,7 +335,10 @@ def getjournal(self, classname, nodeid): |
335 | 335 | if str(error) == "need 'c' or 'n' flag to open new db": return [] |
336 | 336 | elif error.args[0] != 2: raise |
337 | 337 | return [] |
338 | | - journal = marshal.loads(db[nodeid]) |
| 338 | + try: |
| 339 | + journal = marshal.loads(db[nodeid]) |
| 340 | + except KeyError: |
| 341 | + raise KeyError, 'no such %s %s'%(classname, nodeid) |
339 | 342 | res = [] |
340 | 343 | for entry in journal: |
341 | 344 | (nodeid, date_stamp, user, action, params) = entry |
@@ -483,6 +486,9 @@ def rollback(self): |
483 | 486 |
|
484 | 487 | # |
485 | 488 | #$Log: not supported by cvs2svn $ |
| 489 | +#Revision 1.36 2002/06/19 03:07:19 richard |
| 490 | +#Moved the file storage commit into blobfiles where it belongs. |
| 491 | +# |
486 | 492 | #Revision 1.35 2002/05/25 07:16:24 rochecompaan |
487 | 493 | #Merged search_indexing-branch with HEAD |
488 | 494 | # |
|
0 commit comments