[gnue] r9949 - trunk/gnue-common/src/base

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: reinhard
Date: 2009-10-08 17:16:15 -0500 (Thu, 08 Oct 2009)
New Revision: 9949

Modified:
   trunk/gnue-common/src/base/tree.py
Log:
Some more work on working defaults.


Modified: trunk/gnue-common/src/base/tree.py
===================================================================
--- trunk/gnue-common/src/base/tree.py	2009-10-08 22:14:12 UTC (rev 9948)
+++ trunk/gnue-common/src/base/tree.py	2009-10-08 22:16:15 UTC (rev 9949)
@@ -822,7 +822,7 @@
         # If this is a reference to another node, look for it in the parent's
         # node dictionary
         target_type = definition['type']
-        if issubclass(target_type, NamedNode):
+        if issubclass(target_type, NamedNode) and value is not None:
             return self.__root__.__get_node_dict__(target_type)[value]
         else:
             value
@@ -1253,6 +1253,8 @@
     uhura.supervisor = crew.Spock
 
     # Test access to node links.
+    print "Kirk's supervisor is",
+    print repr(crew.__get_child__("James T. Kirk").supervisor)
     print "Spock's supervisor is", repr(crew.Spock.supervisor)
     print "Uhura's supervisor is", repr(uhura.supervisor)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.