comparison roundup/hyperdb.py @ 736:b0d887310f7a

applied patch [SF#558876] cgi client customization ... with significant additions and modifications ;) - extended handling of ML assignedto to all places it's handled - added more NotFound info
author Richard Jones <richard@users.sourceforge.net>
date Wed, 22 May 2002 04:12:05 +0000
parents fed4c363a7f3
children 51c425129b35
comparison
equal deleted inserted replaced
735:1af6aa4e1023 736:b0d887310f7a
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: hyperdb.py,v 1.64 2002-05-15 06:21:21 richard Exp $ 18 # $Id: hyperdb.py,v 1.65 2002-05-22 04:12:05 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Hyperdatabase implementation, especially field types. 21 Hyperdatabase implementation, especially field types.
22 """ 22 """
23 23
606 link_class = self.properties[key].classname 606 link_class = self.properties[key].classname
607 l = [] 607 l = []
608 for entry in value: 608 for entry in value:
609 # if it isn't a number, it's a key 609 # if it isn't a number, it's a key
610 if type(entry) != type(''): 610 if type(entry) != type(''):
611 raise ValueError, 'link value must be String' 611 raise ValueError, 'new property "%s" link value ' \
612 'must be a string'%key
612 if not num_re.match(entry): 613 if not num_re.match(entry):
613 try: 614 try:
614 entry = self.db.classes[link_class].lookup(entry) 615 entry = self.db.classes[link_class].lookup(entry)
615 except (TypeError, KeyError): 616 except (TypeError, KeyError):
616 raise IndexError, 'new property "%s": %s not a %s'%( 617 raise IndexError, 'new property "%s": %s not a %s'%(
1143 cl.create(name=options[i], order=i) 1144 cl.create(name=options[i], order=i)
1144 return hyperdb.Link(name) 1145 return hyperdb.Link(name)
1145 1146
1146 # 1147 #
1147 # $Log: not supported by cvs2svn $ 1148 # $Log: not supported by cvs2svn $
1149 # Revision 1.64 2002/05/15 06:21:21 richard
1150 # . node caching now works, and gives a small boost in performance
1151 #
1152 # As a part of this, I cleaned up the DEBUG output and implemented TRACE
1153 # output (HYPERDBTRACE='file to trace to') with checkpoints at the start of
1154 # CGI requests. Run roundup with python -O to skip all the DEBUG/TRACE stuff
1155 # (using if __debug__ which is compiled out with -O)
1156 #
1148 # Revision 1.63 2002/04/15 23:25:15 richard 1157 # Revision 1.63 2002/04/15 23:25:15 richard
1149 # . node ids are now generated from a lockable store - no more race conditions 1158 # . node ids are now generated from a lockable store - no more race conditions
1150 # 1159 #
1151 # We're using the portalocker code by Jonathan Feinberg that was contributed 1160 # We're using the portalocker code by Jonathan Feinberg that was contributed
1152 # to the ASPN Python cookbook. This gives us locking across Unix and Windows. 1161 # to the ASPN Python cookbook. This gives us locking across Unix and Windows.

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