[Zope-Checkins] SVN: Zope/trunk/src/ - TraversalError is now LocationError
Yvo Schubbe
y.2010 at wcm-solutions.de
Thu Jun 17 07:56:46 EDT 2010
Log message for revision 113591:
- TraversalError is now LocationError
- import cleanup
Changed:
U Zope/trunk/src/OFS/Traversable.py
U Zope/trunk/src/ZPublisher/BaseRequest.py
-=-
Modified: Zope/trunk/src/OFS/Traversable.py
===================================================================
--- Zope/trunk/src/OFS/Traversable.py 2010-06-17 11:52:57 UTC (rev 113590)
+++ Zope/trunk/src/OFS/Traversable.py 2010-06-17 11:56:46 UTC (rev 113591)
@@ -35,7 +35,7 @@
from zope.interface import implements
from zope.interface import Interface
from zope.component import queryMultiAdapter
-from zope.traversing.interfaces import TraversalError
+from zope.location.interfaces import LocationError
from zope.traversing.namespace import namespaceLookup
from zope.traversing.namespace import nsParse
@@ -68,7 +68,7 @@
return self.virtual_url_path()
spp = self.getPhysicalPath()
-
+
try:
toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
except AttributeError:
@@ -204,7 +204,7 @@
if restricted and not validate(
obj, obj, name, next):
raise Unauthorized(name)
- except TraversalError:
+ except LocationError:
raise AttributeError(name)
elif bobo_traverse is not None:
Modified: Zope/trunk/src/ZPublisher/BaseRequest.py
===================================================================
--- Zope/trunk/src/ZPublisher/BaseRequest.py 2010-06-17 11:52:57 UTC (rev 113590)
+++ Zope/trunk/src/ZPublisher/BaseRequest.py 2010-06-17 11:56:46 UTC (rev 113591)
@@ -14,22 +14,26 @@
$Id$
"""
+
from urllib import quote as urllib_quote
import xmlrpc
-from zExceptions import Forbidden, NotFound
+
from Acquisition import aq_base
from Acquisition.interfaces import IAcquirer
-
-from zope.interface import implements, Interface
+from zExceptions import Forbidden
+from zExceptions import NotFound
from zope.component import queryMultiAdapter
from zope.event import notify
+from zope.interface import implements
+from zope.interface import Interface
+from zope.location.interfaces import LocationError
from zope.publisher.defaultview import queryDefaultViewName
from zope.publisher.interfaces import EndRequestEvent
from zope.publisher.interfaces import IPublishTraverse
from zope.publisher.interfaces import NotFound as ztkNotFound
from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.traversing.interfaces import TraversalError
-from zope.traversing.namespace import nsParse, namespaceLookup
+from zope.traversing.namespace import namespaceLookup
+from zope.traversing.namespace import nsParse
UNSPECIFIED_ROLES=''
@@ -319,7 +323,7 @@
if ns:
try:
ob2 = namespaceLookup(ns, nm, ob, self)
- except TraversalError:
+ except LocationError:
raise ztkNotFound(ob, name)
if IAcquirer.providedBy(ob2):
More information about the Zope-Checkins
mailing list