Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.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 | 9445caec3ff5 |
| children | 3bdd34547fa7 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Thu Nov 13 06:03:42 2003 +0000 +++ b/roundup/backends/back_anydbm.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_anydbm.py,v 1.130 2003-11-10 03:56:39 richard Exp $ +#$Id: back_anydbm.py,v 1.131 2003-11-14 00:11:18 richard Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -516,7 +516,11 @@ if str(error) == "need 'c' or 'n' flag to open new db": raise IndexError, 'no such %s %s'%(classname, nodeid) elif 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) try: journal = marshal.loads(db[nodeid]) @@ -936,7 +940,7 @@ l.append(repr(value)) # append retired flag - l.append(self.is_retired(nodeid)) + l.append(repr(self.is_retired(nodeid))) return l
