[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.1.2.28.2.3

Jim Fulton jim@zope.com
Tue, 26 Mar 2002 11:55:07 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv4886/Zope/App/ZopePublication

Modified Files:
      Tag: Zope3-publisher-refactor-branch
	ZopePublication.py 
Log Message:
Got the BrowserPublisher to pass tests.

The remaining task (aside from writing more tests) is to get the
new server setup working.  This should also get the server tests to pass.


=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.28.2.2 => 1.1.2.28.2.3 ===
 
 
-class ZopePublication(DefaultPublication, PublicationTraverse):
+class ZopePublication(PublicationTraverse, DefaultPublication):
     """Base Zope publication specification."""
 
     version_cookie = 'Zope-Version'
@@ -93,9 +93,6 @@
         # Call __before_publishing_traverse__ hooks
         pass
 
-    def traverseName(self, request, ob, name, check_auth=1):
-        raise NotImplementedError('This method must be overridden.')
-
     def getDefaultTraversal(self, request, ob):
         return ob, None
 
@@ -124,15 +121,19 @@
                 request.getResponse().handleException(exc_info)
                 return
 
-            # Look for a component to handle the exception.
-            traversed = request.traversed
-            if traversed:
-                context = traversed[-1]
-                #handler = getExceptionHandler(context, t, IBrowserPublisher)
-                handler = None  # no getExceptionHandler() exists yet.
-                if handler is not None:
-                    handler(request, exc_info)
-                    return
+
+            # XXX This is wrong. Should use getRequstView:
+            # 
+            # 
+            # # Look for a component to handle the exception.
+            # traversed = request.traversed
+            # if traversed:
+            #     context = traversed[-1]
+            #     #handler = getExceptionHandler(context, t, IBrowserPublisher)
+            #     handler = None  # no getExceptionHandler() exists yet.
+            #     if handler is not None:
+            #         handler(request, exc_info)
+            #         return
 
             # Convert ConflictErrors to Retry exceptions.
             if retry_allowed and isinstance(exc_info[1], ConflictError):