Commit b3248fba authored by 's avatar

- TraversalError is now LocationError

- import cleanup
parent 4529cae0
......@@ -35,7 +35,7 @@ from ZODB.POSException import ConflictError
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 @@ class Traversable:
return self.virtual_url_path()
spp = self.getPhysicalPath()
try:
toUrl = aq_acquire(self, 'REQUEST').physicalPathToURL
except AttributeError:
......@@ -204,7 +204,7 @@ class Traversable:
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:
......
......@@ -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 @@ class BaseRequest:
if ns:
try:
ob2 = namespaceLookup(ns, nm, ob, self)
except TraversalError:
except LocationError:
raise ztkNotFound(ob, name)
if IAcquirer.providedBy(ob2):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment