Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.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 | 27917dce3814 |
| children |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Tue Nov 11 22:25:37 2003 +0000 +++ b/roundup/backends/back_anydbm.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_anydbm.py,v 1.122.2.1 2003-08-26 00:12:28 richard Exp $ +#$Id: back_anydbm.py,v 1.122.2.2 2003-11-14 00:19:01 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 @@ -508,7 +508,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]) @@ -927,7 +931,7 @@ l.append(repr(value)) # append retired flag - l.append(self.is_retired(nodeid)) + l.append(repr(self.is_retired(nodeid))) return l
