Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 415:105a052508a0
Another place that wasn't handling missing properties.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 27 Nov 2001 03:16:09 +0000 |
| parents | bdc2ea127ae9 |
| children | 831e91e23963 |
comparison
equal
deleted
inserted
replaced
| 414:fc6d03e9dbc1 | 415:105a052508a0 |
|---|---|
| 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.35 2001-11-22 15:46:42 jhermann Exp $ | 18 # $Id: hyperdb.py,v 1.36 2001-11-27 03:16:09 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Hyperdatabase implementation, especially field types. | 21 Hyperdatabase implementation, especially field types. |
| 22 """ | 22 """ |
| 23 | 23 |
| 632 node = self.db.getnode(cn, nodeid, cldb) | 632 node = self.db.getnode(cn, nodeid, cldb) |
| 633 if node.has_key(self.db.RETIRED_FLAG): | 633 if node.has_key(self.db.RETIRED_FLAG): |
| 634 continue | 634 continue |
| 635 # apply filter | 635 # apply filter |
| 636 for t, k, v in filterspec: | 636 for t, k, v in filterspec: |
| 637 # this node doesn't have this property, so reject it | |
| 638 if not node.has_key(k): break | |
| 639 | |
| 637 if t == 0 and node[k] not in v: | 640 if t == 0 and node[k] not in v: |
| 638 # link - if this node'd property doesn't appear in the | 641 # link - if this node'd property doesn't appear in the |
| 639 # filterspec's nodeid list, skip it | 642 # filterspec's nodeid list, skip it |
| 640 break | 643 break |
| 641 elif t == 1: | 644 elif t == 1: |
| 862 cl.create(name=option[i], order=i) | 865 cl.create(name=option[i], order=i) |
| 863 return hyperdb.Link(name) | 866 return hyperdb.Link(name) |
| 864 | 867 |
| 865 # | 868 # |
| 866 # $Log: not supported by cvs2svn $ | 869 # $Log: not supported by cvs2svn $ |
| 870 # Revision 1.35 2001/11/22 15:46:42 jhermann | |
| 871 # Added module docstrings to all modules. | |
| 872 # | |
| 867 # Revision 1.34 2001/11/21 04:04:43 richard | 873 # Revision 1.34 2001/11/21 04:04:43 richard |
| 868 # *sigh* more missing value handling | 874 # *sigh* more missing value handling |
| 869 # | 875 # |
| 870 # Revision 1.33 2001/11/21 03:40:54 richard | 876 # Revision 1.33 2001/11/21 03:40:54 richard |
| 871 # more new property handling | 877 # more new property handling |
