[Zope3-checkins] CVS: Zope3/src/zope/app - dependable.py:1.5.24.1

Jim Fulton jim at zope.com
Tue Sep 9 17:32:26 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv29240

Modified Files:
      Tag: parentgeddon-branch
	dependable.py 
Log Message:
got more tests to pass on branch

=== Zope3/src/zope/app/dependable.py 1.5 => 1.5.24.1 ===
--- Zope3/src/zope/app/dependable.py:1.5	Thu Jun 12 15:28:08 2003
+++ Zope3/src/zope/app/dependable.py	Tue Sep  9 16:31:55 2003
@@ -36,11 +36,15 @@
     def __init__(self, context):
         self.context = context
         try:
-            pp = getPath(getParent(self.context))
+            parent = getParent(self.context)
+        except TypeError:
+            parent = None
+        if parent is not None:
+            pp = getPath(parent)
             if not pp.endswith("/"):
                 pp += "/"
             self.pp = pp # parentpath
-        except TypeError:
+        else:
             self.pp = ""
         self.pplen = len(self.pp)
 




More information about the Zope3-Checkins mailing list