diff roundup/backends/back_anydbm.py @ 3166:3204488d20b5

hack to fix some anydbm export problems [SF#1081454]
author Richard Jones <richard@users.sourceforge.net>
date Mon, 14 Feb 2005 05:39:37 +0000
parents 57b60bda9473
children 440f0a6a2e3c
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py	Mon Feb 14 04:53:41 2005 +0000
+++ b/roundup/backends/back_anydbm.py	Mon Feb 14 05:39:37 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.184 2005-02-14 02:48:11 richard Exp $
+#$Id: back_anydbm.py,v 1.185 2005-02-14 05:39:37 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/