Mercurial > p > roundup > code
diff roundup/backends/back_anydbm.py @ 3003:855e9f99c96c
merge from maint-0-8
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 14 Dec 2004 23:02:33 +0000 |
| parents | 2ddba486546a |
| children | 230f7394cce9 |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Wed Dec 08 08:30:46 2004 +0000 +++ b/roundup/backends/back_anydbm.py Tue Dec 14 23:02:33 2004 +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.179 2004-11-25 23:53:31 richard Exp $ +#$Id: back_anydbm.py,v 1.180 2004-12-14 23:02:33 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 versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several @@ -2018,19 +2018,25 @@ for nodeid, date, user, action, params in self.history(nodeid): date = date.get_tuple() if action == 'set': + export_data = {} for propname, value in params.items(): + if not properties.has_key(propname): + # property no longer in the schema + continue + prop = properties[propname] # make sure the params are eval()'able if value is None: - pass + # don't export empties + continue elif isinstance(prop, hyperdb.Date): value = value.get_tuple() elif isinstance(prop, hyperdb.Interval): value = value.get_tuple() elif isinstance(prop, hyperdb.Password): value = str(value) - params[propname] = value - l = [nodeid, date, user, action, params] + export_data[propname] = value + l = [nodeid, date, user, action, export_data] r.append(map(repr, l)) return r
