diff roundup/backends/back_anydbm.py @ 224:ad2c98faec97

using isinstance(blah, Foo) now instead of isFooType
author Richard Jones <richard@users.sourceforge.net>
date Sun, 12 Aug 2001 06:32:36 +0000
parents 18134bffab37
children 76c6994aa4e8
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py	Wed Aug 08 03:29:35 2001 +0000
+++ b/roundup/backends/back_anydbm.py	Sun Aug 12 06:32:36 2001 +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.6 2001-08-07 00:24:42 richard Exp $
+#$Id: back_anydbm.py,v 1.7 2001-08-12 06:32:36 richard Exp $
 
 import anydbm, os, marshal
 from roundup import hyperdb, date
@@ -99,9 +99,9 @@
         # convert the instance data to builtin types
         properties = self.classes[classname].properties
         for key in properties.keys():
-            if properties[key].isDateType:
+            if isinstance(properties[key], hyperdb.Date):
                 node[key] = node[key].get_tuple()
-            elif properties[key].isIntervalType:
+            elif isinstance(properties[key], hyperdb.Interval):
                 node[key] = node[key].get_tuple()
 
         # now save the marshalled data
@@ -121,9 +121,9 @@
         properties = self.classes[classname].properties
         for key in properties.keys():
             if key == self.RETIRED_FLAG: continue
-            if properties[key].isDateType:
+            if isinstance(properties[key], hyperdb.Date):
                 res[key] = date.Date(res[key])
-            elif properties[key].isIntervalType:
+            elif isinstance(properties[key], hyperdb.Interval):
                 res[key] = date.Interval(res[key])
 
         if not cldb: db.close()
@@ -218,6 +218,9 @@
 
 #
 #$Log: not supported by cvs2svn $
+#Revision 1.6  2001/08/07 00:24:42  richard
+#stupid typo
+#
 #Revision 1.5  2001/08/07 00:15:51  richard
 #Added the copyright/license notice to (nearly) all files at request of
 #Bizar Software.

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