Skip to content

Commit 141d800

Browse files
author
Richard Jones
committed
merge from maint-0-7
1 parent a65b23f commit 141d800

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

roundup/backends/back_anydbm.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.179 2004-11-25 23:53:31 richard Exp $
18+
#$Id: back_anydbm.py,v 1.179.2.1 2004-12-14 23:01:56 richard Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -2018,19 +2018,25 @@ def export_journals(self):
20182018
for nodeid, date, user, action, params in self.history(nodeid):
20192019
date = date.get_tuple()
20202020
if action == 'set':
2021+
export_data = {}
20212022
for propname, value in params.items():
2023+
if not properties.has_key(propname):
2024+
# property no longer in the schema
2025+
continue
2026+
20222027
prop = properties[propname]
20232028
# make sure the params are eval()'able
20242029
if value is None:
2025-
pass
2030+
# don't export empties
2031+
continue
20262032
elif isinstance(prop, hyperdb.Date):
20272033
value = value.get_tuple()
20282034
elif isinstance(prop, hyperdb.Interval):
20292035
value = value.get_tuple()
20302036
elif isinstance(prop, hyperdb.Password):
20312037
value = str(value)
2032-
params[propname] = value
2033-
l = [nodeid, date, user, action, params]
2038+
export_data[propname] = value
2039+
l = [nodeid, date, user, action, export_data]
20342040
r.append(map(repr, l))
20352041
return r
20362042

0 commit comments

Comments
 (0)