Skip to content

Commit a112b5d

Browse files
author
Richard Jones
committed
hack to fix some anydbm export problems [SF#1081454]
1 parent b8b5dca commit a112b5d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Fixed:
9696
- fix search_checkboxes macro (sf patch 1113828)
9797
- fix bug in date editing in Metakit
9898
- allow suppression of search_text in indexargs_form (sf bug 1101548)
99+
- hack to fix some anydbm export problems (sf bug 1081454)
99100

100101

101102
2005-01-06 0.7.11

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Johannes Gijsbers,
9090
Gus Gollings,
9191
Dan Grassi,
9292
Robin Green,
93+
Charles Groves,
9394
Engelbert Gruber,
9495
Bruce Guenter,
9596
Juergen Hermann,

roundup/backends/back_anydbm.py

Lines changed: 4 additions & 2 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.184 2005-02-14 02:48:11 richard Exp $
18+
#$Id: back_anydbm.py,v 1.185 2005-02-14 05:39:37 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
@@ -2025,7 +2025,9 @@ def export_journals(self):
20252025
# don't export empties
20262026
continue
20272027
elif isinstance(prop, hyperdb.Date):
2028-
value = value.get_tuple()
2028+
# this is a hack - some dates are stored as strings
2029+
if not isinstance(value, type('')):
2030+
value = value.get_tuple()
20292031
elif isinstance(prop, hyperdb.Interval):
20302032
value = value.get_tuple()
20312033
elif isinstance(prop, hyperdb.Password):

0 commit comments

Comments
 (0)