1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: hyperdb.py,v 1.68 2002-06-11 06:52:03 richard Exp $
18+ # $Id: hyperdb.py,v 1.69 2002-06-17 23:15:29 richard Exp $
1919
2020__doc__ = """
2121Hyperdatabase implementation, especially field types.
2222"""
2323
2424# standard python modules
25- import re , string , weakref , os , time
25+ import sys , re , string , weakref , os , time
2626
2727# roundup modules
2828import date , password
@@ -33,12 +33,18 @@ def write(self, content):
3333 pass
3434DEBUG = os .environ .get ('HYPERDBDEBUG' , '' )
3535if DEBUG and __debug__ :
36- DEBUG = open (DEBUG , 'a' )
36+ if DEBUG == 'stdout' :
37+ DEBUG = sys .stdout
38+ else :
39+ DEBUG = open (DEBUG , 'a' )
3740else :
3841 DEBUG = Sink ()
3942TRACE = os .environ .get ('HYPERDBTRACE' , '' )
4043if TRACE and __debug__ :
41- TRACE = open (TRACE , 'w' )
44+ if TRACE == 'stdout' :
45+ TRACE = sys .stdout
46+ else :
47+ TRACE = open (TRACE , 'w' )
4248else :
4349 TRACE = Sink ()
4450def traceMark ():
@@ -416,6 +422,8 @@ def create(self, **propvalues):
416422 elif isinstance (prop , Multilink ):
417423 if type (value ) != type ([]):
418424 raise TypeError , 'new property "%s" not a list of ids' % key
425+
426+ # clean up and validate the list of links
419427 link_class = self .properties [key ].classname
420428 l = []
421429 for entry in value :
@@ -1161,6 +1169,9 @@ def Choice(name, db, *options):
11611169
11621170#
11631171# $Log: not supported by cvs2svn $
1172+ # Revision 1.68 2002/06/11 06:52:03 richard
1173+ # . #564271 ] find() and new properties
1174+ #
11641175# Revision 1.67 2002/06/11 05:02:37 richard
11651176# . #565979 ] code error in hyperdb.Class.find
11661177#
0 commit comments