Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 397:d47818b09265
more new property handling
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 21 Nov 2001 03:40:54 +0000 |
| parents | d4b19c2ee740 |
| children | bbbcdee47762 |
comparison
equal
deleted
inserted
replaced
| 396:3fc58fefed83 | 397:d47818b09265 |
|---|---|
| 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.32 2001-11-21 03:11:28 richard Exp $ | 18 # $Id: hyperdb.py,v 1.33 2001-11-21 03:40:54 richard Exp $ |
| 19 | 19 |
| 20 # standard python modules | 20 # standard python modules |
| 21 import cPickle, re, string | 21 import cPickle, re, string |
| 22 | 22 |
| 23 # roundup modules | 23 # roundup modules |
| 303 pass | 303 pass |
| 304 else: | 304 else: |
| 305 raise ValueError, 'node with key "%s" exists'%value | 305 raise ValueError, 'node with key "%s" exists'%value |
| 306 | 306 |
| 307 # this will raise the KeyError if the property isn't valid | 307 # this will raise the KeyError if the property isn't valid |
| 308 # ... we don't use getprops() here because we only care about | |
| 309 # the writeable properties. | |
| 308 prop = self.properties[key] | 310 prop = self.properties[key] |
| 309 | 311 |
| 310 if isinstance(prop, Link): | 312 if isinstance(prop, Link): |
| 311 link_class = self.properties[key].classname | 313 link_class = self.properties[key].classname |
| 312 # if it isn't a number, it's a key | 314 # if it isn't a number, it's a key |
| 845 cl.create(name=option[i], order=i) | 847 cl.create(name=option[i], order=i) |
| 846 return hyperdb.Link(name) | 848 return hyperdb.Link(name) |
| 847 | 849 |
| 848 # | 850 # |
| 849 # $Log: not supported by cvs2svn $ | 851 # $Log: not supported by cvs2svn $ |
| 852 # Revision 1.32 2001/11/21 03:11:28 richard | |
| 853 # Better handling of new properties. | |
| 854 # | |
| 850 # Revision 1.31 2001/11/12 22:01:06 richard | 855 # Revision 1.31 2001/11/12 22:01:06 richard |
| 851 # Fixed issues with nosy reaction and author copies. | 856 # Fixed issues with nosy reaction and author copies. |
| 852 # | 857 # |
| 853 # Revision 1.30 2001/11/09 10:11:08 richard | 858 # Revision 1.30 2001/11/09 10:11:08 richard |
| 854 # . roundup-admin now handles all hyperdb exceptions | 859 # . roundup-admin now handles all hyperdb exceptions |
