Mercurial > p > roundup > code
changeset 3002:60dbc224b6ca maint-0.8
merge from maint-0-7
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 14 Dec 2004 23:01:56 +0000 |
| parents | 61802b144ebc |
| children | cf433fe67f8b |
| files | roundup/backends/back_anydbm.py |
| diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py Tue Dec 14 23:01:56 2004 +0000 +++ b/roundup/backends/back_anydbm.py Tue Dec 14 23:01:56 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.179.2.1 2004-12-14 23:01:56 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
