[Zope3-checkins] CVS: Zope3/src/zope/app/component - nextservice.py:1.8

Jim Fulton jim at zope.com
Sun Sep 21 13:31:58 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv13143/src/zope/app/component

Modified Files:
	nextservice.py 
Log Message:
Use the location framework rather than context wrappers.


=== Zope3/src/zope/app/component/nextservice.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/component/nextservice.py:1.7	Tue Sep  2 16:46:45 2003
+++ Zope3/src/zope/app/component/nextservice.py	Sun Sep 21 13:31:26 2003
@@ -18,7 +18,6 @@
 
 from zope.component.exceptions import ComponentLookupError
 from zope.component.service import serviceManager
-from zope.context import getWrapperContainer
 from zope.proxy import removeAllProxies
 from zope.app.interfaces.services.service import ISite
 from zope.app.component.hooks import getServiceManager_hook
@@ -59,20 +58,20 @@
 
     # get the service manager container, which ought to be the context
     # contaioner.
-    container = getWrapperContainer(sm)
+    container = sm.__parent__
 
     # But we're *really* paranoid, so we'll double check.
     while ((container is not None) and not
            ISite.isImplementedBy(removeAllProxies(container))
            ):
-        container = getWrapperContainer(container) # we should be
+        container = container.__parent__ # we should be
 
     # Now we need to step up so we can look for a service manager above.
-    context = getWrapperContainer(container)
+    context = getattr(container, '__parent__', None)
 
     # But we have to make sure we haven't got the same object..
     while (context is not None) and (context == container):
-        context = getWrapperContainer(context)
+        context = context.__parent__
 
     if context is None:
         return serviceManager




More information about the Zope3-Checkins mailing list