[Zope3-checkins] CVS: Zope3/src/zope/app/traversing -
namespace.py:1.19.2.2
Jim Fulton
jim at zope.com
Tue Sep 9 12:47:40 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/traversing
In directory cvs.zope.org:/tmp/cvs-serv13092/src/zope/app/traversing
Modified Files:
Tag: parentgeddon-branch
namespace.py
Log Message:
got more tests to pass
=== Zope3/src/zope/app/traversing/namespace.py 1.19.2.1 => 1.19.2.2 ===
--- Zope3/src/zope/app/traversing/namespace.py:1.19.2.1 Mon Sep 8 14:21:50 2003
+++ Zope3/src/zope/app/traversing/namespace.py Tue Sep 9 11:47:09 2003
@@ -19,9 +19,8 @@
from zope.component import queryAdapter
from zope.component import queryDefaultViewName, queryView, getService
from zope.app.services.servicenames import Resources
-
from zope.app.interfaces.traversing import ITraversable
-
+from zope.proxy import removeAllProxies
import re
class UnexpectedParameters(NotFoundError):
@@ -96,8 +95,15 @@
resource = resource_service.queryResource(ob, name, request)
if resource is None:
return default
- resource.__parent__ = resource_service
- resource.__name__ = name
+
+ # We need to set the __parent__ and __name__. We need the unproxied
+ # resource to do this. we will still return the proxied resource.
+ r = removeAllProxies(resource)
+
+ r.__parent__ = ob
+ r.__name__ = name
+
+ return resource
# ---- namespace processors below ----
More information about the Zope3-Checkins
mailing list