diff roundup/backends/back_anydbm.py @ 3167:311cdc126ff3 maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 14 Feb 2005 05:41:56 +0000
parents e1da7b5b04ab
children ed97e2a85576
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py	Mon Feb 14 04:58:18 2005 +0000
+++ b/roundup/backends/back_anydbm.py	Mon Feb 14 05:41:56 2005 +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.2.5 2005-02-14 02:55:30 richard Exp $
+#$Id: back_anydbm.py,v 1.179.2.6 2005-02-14 05:40:54 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
@@ -2025,7 +2025,9 @@
                             # don't export empties
                             continue
                         elif isinstance(prop, hyperdb.Date):
-                            value = value.get_tuple()
+                            # this is a hack - some dates are stored as strings
+                            if not isinstance(value, type('')):
+                                value = value.get_tuple()
                         elif isinstance(prop, hyperdb.Interval):
                             value = value.get_tuple()
                         elif isinstance(prop, hyperdb.Password):

Roundup Issue Tracker: http://roundup-tracker.org/