[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - Traversers.py:1.1.2.7
Andreas Jung
andreas@digicool.com
Thu, 10 Jan 2002 13:38:53 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv4660
Modified Files:
Tag: Zope-3x-branch
Traversers.py
Log Message:
removed check for docstring
=== Zope3/lib/python/Zope/App/ZopePublication/Traversers.py 1.1.2.6 => 1.1.2.7 ===
from Zope.Publisher.Exceptions import Unauthorized, NotFound, DebugError
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
-from Zope.ComponentArchitecture import getView
+from Zope.ComponentArchitecture import getRequestView
class DefaultTraverser:
"""
@@ -23,7 +23,7 @@
ob = self.target
# Use the default view.
- p = getView(ob, '', IBrowserPublisher, None)
+ p = getRequestView(ob, '', request , None)
if p is None:
return ob, ()
@@ -37,7 +37,7 @@
if name[:1] == '_':
raise Unauthorized("Name %s begins with an underscore" % `name`)
if name[-5:]==';view':
- return getView( ob, name[:-5], IBrowserPublisher )
+ return getRequestView( ob, name[:-5], request)
if hasattr(ob, name):
subob = getattr(ob, name)
else:
@@ -46,7 +46,5 @@
except (KeyError, IndexError,
TypeError, AttributeError):
raise NotFound(ob, name, request)
- if not getattr(subob, '__doc__', None):
- raise DebugError(subob, 'Missing or empty doc string at: %s' %
- request.getURL())
+
return subob