Mercurial > p > roundup > code
diff roundup/backends/back_bsddb.py @ 1920:f9316d2cd5ba
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:11:19 +0000 |
| parents | a3b1b1dcf639 |
| children | fc52d57c6c3e |
line wrap: on
line diff
--- a/roundup/backends/back_bsddb.py Thu Nov 13 06:03:42 2003 +0000 +++ b/roundup/backends/back_bsddb.py Fri Nov 14 00:11:19 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.27 2003-09-08 20:39:18 jlgijsbers Exp $ +#$Id: back_bsddb.py,v 1.28 2003-11-14 00:11:18 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):
