Mercurial > p > roundup > code
diff roundup/backends/back_bsddb.py @ 1921:4ad75ca452d9 maint-0.6
fixed retirement of items in rdbms imports [SF#841355]
fixed bug in looking up journal of newly-created items in *dbm backends
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 14 Nov 2003 00:19:02 +0000 |
| parents | 8a908bbad1ef |
| children |
line wrap: on
line diff
--- a/roundup/backends/back_bsddb.py Tue Nov 11 22:25:37 2003 +0000 +++ b/roundup/backends/back_bsddb.py Fri Nov 14 00:19:02 2003 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_bsddb.py,v 1.26 2003-05-09 01:47:50 richard Exp $ +#$Id: back_bsddb.py,v 1.26.2.1 2003-11-14 00:19:01 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in BSDDB. ''' @@ -105,7 +105,12 @@ db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'r') except bsddb.error, error: - if error.args[0] != 2: raise + if error.args[0] != 2: + # this isn't a "not found" error, be alarmed! + raise + if res: + # we have unsaved journal entries, return them + return res raise IndexError, 'no such %s %s'%(classname, nodeid) # more handling of bad journals if not db.has_key(nodeid):
