comparison roundup/hyperdb.py @ 172:c580555a6508

mailgw was assuming certain properties existed on the issues being created.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 01 Aug 2001 04:24:21 +0000
parents 9c5ddad06430
children 1536be43d2fa
comparison
equal deleted inserted replaced
171:3c19bc818711 172:c580555a6508
1 # $Id: hyperdb.py,v 1.10 2001-07-30 02:38:31 richard Exp $ 1 # $iD: HYperdb.py,v 1.10 2001/07/30 02:38:31 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
117 except KeyError: 117 except KeyError:
118 pass 118 pass
119 else: 119 else:
120 raise ValueError, 'node with key "%s" exists'%value 120 raise ValueError, 'node with key "%s" exists'%value
121 121
122 prop = self.properties[key] 122 # try to handle this property
123 try:
124 prop = self.properties[key]
125 except KeyError:
126 raise KeyError, '"%s" has no property "%s"'%(self.classname,
127 key)
123 128
124 if prop.isLinkType: 129 if prop.isLinkType:
125 if type(value) != type(''): 130 if type(value) != type(''):
126 raise ValueError, 'link value must be String' 131 raise ValueError, 'link value must be String'
127 # value = str(value) 132 # value = str(value)
791 cl.create(name=option[i], order=i) 796 cl.create(name=option[i], order=i)
792 return hyperdb.Link(name) 797 return hyperdb.Link(name)
793 798
794 # 799 #
795 # $Log: not supported by cvs2svn $ 800 # $Log: not supported by cvs2svn $
801 # Revision 1.10 2001/07/30 02:38:31 richard
802 # get() now has a default arg - for migration only.
803 #
796 # Revision 1.9 2001/07/29 09:28:23 richard 804 # Revision 1.9 2001/07/29 09:28:23 richard
797 # Fixed sorting by clicking on column headings. 805 # Fixed sorting by clicking on column headings.
798 # 806 #
799 # Revision 1.8 2001/07/29 08:27:40 richard 807 # Revision 1.8 2001/07/29 08:27:40 richard
800 # Fixed handling of passed-in values in form elements (ie. during a 808 # Fixed handling of passed-in values in form elements (ie. during a

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