comparison hyperdb.py @ 19:a5eb90ae8903

Fixed a bug in the filter wrong variable names in the error message. Recognised that the filter has an outstanding bug. Hrm. we need a bug tracker for this project :)
author Richard Jones <richard@users.sourceforge.net>
date Fri, 20 Jul 2001 08:20:24 +0000
parents bb0572c92f23
children
comparison
equal deleted inserted replaced
18:bb0572c92f23 19:a5eb90ae8903
1 # $Id: hyperdb.py,v 1.5 2001-07-20 07:35:55 richard Exp $ 1 # $Id: hyperdb.py,v 1.6 2001-07-20 08:20:24 richard Exp $
2 2
3 # standard python modules 3 # standard python modules
4 import cPickle, re, string 4 import cPickle, re, string
5 5
6 # roundup modules 6 # roundup modules
484 if not num_re.match(entry): 484 if not num_re.match(entry):
485 try: 485 try:
486 entry = link_class.lookup(entry) 486 entry = link_class.lookup(entry)
487 except: 487 except:
488 raise ValueError, 'new property "%s": %s not a %s'%( 488 raise ValueError, 'new property "%s": %s not a %s'%(
489 key, entry, self.properties[key].classname) 489 k, entry, self.properties[k].classname)
490 u.append(entry) 490 u.append(entry)
491 491
492 l.append((0, k, u)) 492 l.append((0, k, u))
493 elif propclass.isMultilinkType: 493 elif propclass.isMultilinkType:
494 if type(v) is not type([]): 494 if type(v) is not type([]):
500 if not num_re.match(entry): 500 if not num_re.match(entry):
501 try: 501 try:
502 entry = link_class.lookup(entry) 502 entry = link_class.lookup(entry)
503 except: 503 except:
504 raise ValueError, 'new property "%s": %s not a %s'%( 504 raise ValueError, 'new property "%s": %s not a %s'%(
505 key, entry, self.properties[key].classname) 505 k, entry, self.properties[k].classname)
506 u.append(entry) 506 u.append(entry)
507 l.append((1, k, u)) 507 l.append((1, k, u))
508 elif propclass.isStringType: 508 elif propclass.isStringType:
509 v = v[0] 509 v = v[0]
510 if '*' in v or '?' in v: 510 if '*' in v or '?' in v:
735 cl.create(name=option[i], order=i) 735 cl.create(name=option[i], order=i)
736 return hyperdb.Link(name) 736 return hyperdb.Link(name)
737 737
738 # 738 #
739 # $Log: not supported by cvs2svn $ 739 # $Log: not supported by cvs2svn $
740 740 # Revision 1.5 2001/07/20 07:35:55 richard
741 # largish changes as a start of splitting off bits and pieces to allow more
742 # flexible installation / database back-ends
743 #
744

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