diff roundup/backends/back_bsddb3.py @ 270:a4241ddd22d7

Added the Password property type. See "pydoc roundup.password" for implementation details. Have updated some of the documentation too.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 09 Oct 2001 07:25:59 +0000
parents ad2c98faec97
children 1cc866cec608
line wrap: on
line diff
--- a/roundup/backends/back_bsddb3.py	Mon Oct 08 23:36:44 2001 +0000
+++ b/roundup/backends/back_bsddb3.py	Tue Oct 09 07:25:59 2001 +0000
@@ -15,10 +15,10 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-#$Id: back_bsddb3.py,v 1.7 2001-08-12 06:32:36 richard Exp $
+#$Id: back_bsddb3.py,v 1.8 2001-10-09 07:25:59 richard Exp $
 
 import bsddb3, os, marshal
-from roundup import hyperdb, date
+from roundup import hyperdb, date, password
 
 #
 # Now the database
@@ -103,6 +103,8 @@
                 node[key] = node[key].get_tuple()
             elif isinstance(properties[key], hyperdb.Interval):
                 node[key] = node[key].get_tuple()
+            elif isinstance(properties[key], hyperdb.Password):
+                node[key] = str(node[key])
 
         # now save the marshalled data
         db[nodeid] = marshal.dumps(node)
@@ -124,6 +126,10 @@
                 res[key] = date.Date(res[key])
             elif isinstance(properties[key], hyperdb.Interval):
                 res[key] = date.Interval(res[key])
+            elif isinstance(properties[key], hyperdb.Password):
+                p = password.Password()
+                p.unpack(res[key])
+                res[key] = p
 
         if not cldb: db.close()
         return res
@@ -219,6 +225,9 @@
 
 #
 #$Log: not supported by cvs2svn $
+#Revision 1.7  2001/08/12 06:32:36  richard
+#using isinstance(blah, Foo) now instead of isFooType
+#
 #Revision 1.6  2001/08/07 00:24:42  richard
 #stupid typo
 #

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