comparison roundup/hyperdb.py @ 419:831e91e23963

login_action and newuser_action return values were being ignored Woohoo! Found that bloody re-login bug that was killing the mail gateway. (also a minor cleanup in hyperdb)
author Richard Jones <richard@users.sourceforge.net>
date Wed, 28 Nov 2001 21:55:35 +0000
parents 105a052508a0
children 350685601f37
comparison
equal deleted inserted replaced
418:3e31e53a6ff6 419:831e91e23963
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.36 2001-11-27 03:16:09 richard Exp $ 18 # $Id: hyperdb.py,v 1.37 2001-11-28 21:55:35 richard Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Hyperdatabase implementation, especially field types. 21 Hyperdatabase implementation, especially field types.
22 """ 22 """
23 23
156 if not num_re.match(value): 156 if not num_re.match(value):
157 try: 157 try:
158 value = self.db.classes[link_class].lookup(value) 158 value = self.db.classes[link_class].lookup(value)
159 except: 159 except:
160 raise IndexError, 'new property "%s": %s not a %s'%( 160 raise IndexError, 'new property "%s": %s not a %s'%(
161 key, value, self.properties[key].classname) 161 key, value, link_class)
162 elif not self.db.hasnode(link_class, value):
163 raise IndexError, '%s has no node %s'%(link_class, value)
164
165 # save off the value
162 propvalues[key] = value 166 propvalues[key] = value
163 if not self.db.hasnode(link_class, value):
164 raise IndexError, '%s has no node %s'%(link_class, value)
165 167
166 # register the link with the newly linked node 168 # register the link with the newly linked node
167 self.db.addjournal(link_class, value, 'link', 169 self.db.addjournal(link_class, value, 'link',
168 (self.classname, newid, key)) 170 (self.classname, newid, key))
169 171
865 cl.create(name=option[i], order=i) 867 cl.create(name=option[i], order=i)
866 return hyperdb.Link(name) 868 return hyperdb.Link(name)
867 869
868 # 870 #
869 # $Log: not supported by cvs2svn $ 871 # $Log: not supported by cvs2svn $
872 # Revision 1.36 2001/11/27 03:16:09 richard
873 # Another place that wasn't handling missing properties.
874 #
870 # Revision 1.35 2001/11/22 15:46:42 jhermann 875 # Revision 1.35 2001/11/22 15:46:42 jhermann
871 # Added module docstrings to all modules. 876 # Added module docstrings to all modules.
872 # 877 #
873 # Revision 1.34 2001/11/21 04:04:43 richard 878 # Revision 1.34 2001/11/21 04:04:43 richard
874 # *sigh* more missing value handling 879 # *sigh* more missing value handling

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