comparison roundup/hyperdb.py @ 805:6937eb92061f

Improve an error message.
author Gordon B. McMillan <gmcm@users.sourceforge.net>
date Thu, 27 Jun 2002 12:06:20 +0000
parents 4409798dfa15
children 0779ea9f1f18
comparison
equal deleted inserted replaced
804:af4826d8773d 805:6937eb92061f
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.69 2002-06-17 23:15:29 richard Exp $ 18 # $Id: hyperdb.py,v 1.70 2002-06-27 12:06:20 gmcm Exp $
19 19
20 __doc__ = """ 20 __doc__ = """
21 Hyperdatabase implementation, especially field types. 21 Hyperdatabase implementation, especially field types.
22 """ 22 """
23 23
426 # clean up and validate the list of links 426 # clean up and validate the list of links
427 link_class = self.properties[key].classname 427 link_class = self.properties[key].classname
428 l = [] 428 l = []
429 for entry in value: 429 for entry in value:
430 if type(entry) != type(''): 430 if type(entry) != type(''):
431 raise ValueError, 'link value must be String' 431 raise ValueError, '"%s" link value (%s) must be String' % (key, value)
432 # if it isn't a number, it's a key 432 # if it isn't a number, it's a key
433 if not num_re.match(entry): 433 if not num_re.match(entry):
434 try: 434 try:
435 entry = self.db.classes[link_class].lookup(entry) 435 entry = self.db.classes[link_class].lookup(entry)
436 except (TypeError, KeyError): 436 except (TypeError, KeyError):
1167 cl.create(name=options[i], order=i) 1167 cl.create(name=options[i], order=i)
1168 return hyperdb.Link(name) 1168 return hyperdb.Link(name)
1169 1169
1170 # 1170 #
1171 # $Log: not supported by cvs2svn $ 1171 # $Log: not supported by cvs2svn $
1172 # Revision 1.69 2002/06/17 23:15:29 richard
1173 # Can debug to stdout now
1174 #
1172 # Revision 1.68 2002/06/11 06:52:03 richard 1175 # Revision 1.68 2002/06/11 06:52:03 richard
1173 # . #564271 ] find() and new properties 1176 # . #564271 ] find() and new properties
1174 # 1177 #
1175 # Revision 1.67 2002/06/11 05:02:37 richard 1178 # Revision 1.67 2002/06/11 05:02:37 richard
1176 # . #565979 ] code error in hyperdb.Class.find 1179 # . #565979 ] code error in hyperdb.Class.find

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