[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - PublicationTraverse.py:1.1.2.10.4.2
Gary Poster
garyposter@earthlink.net
Tue, 2 Apr 2002 11:52:41 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv3016/lib/python/Zope/App/ZopePublication
Modified Files:
Tag: gary-pre_create_views-branch
PublicationTraverse.py
Log Message:
fixed a few approaches to jibe with unit test assumptions
=== Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py 1.1.2.10.4.1 => 1.1.2.10.4.2 ===
from Zope.ContextWrapper import Wrapper
-from Zope.App.ZMI.Addable import ContentAddables # gp
+from Zope.App.ZMI.Addable import ContentAddables
from Zope.App.OFS.Container.IContainer import IWriteContainer
class DuplicateNamespaces(Exception):
@@ -152,12 +152,10 @@
raise NotFound(ob, name, request)
raise ExcessiveWrapping(ob, name, request)
- def _traversecreate(self, request, ob, name): # gp
- if IWriteContainer.isImplementedBy(ob): # so we definitely have
- # a "setObject" available for the create
- for addable in ContentAddables.getAddables(ob):
- if addable.id() == name:
- return addable
+ def _traversecreate(self, request, ob, name):
+ for addable in ContentAddables.getAddables(ob):
+ if addable.id() == name:
+ return addable
raise NotFound(ob, name, request)