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

Jim Fulton jim@zope.com
Fri, 23 May 2003 13:43:40 -0400


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

Modified Files:
	nextservice.py 
Log Message:
Added a check to prevent a call to getServiceManager_hook if the
context object is None, since we already know we want the global
service manager at that point.


=== Zope3/src/zope/app/component/nextservice.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/component/nextservice.py:1.3	Tue Mar 11 16:08:40 2003
+++ Zope3/src/zope/app/component/nextservice.py	Fri May 23 13:43:39 2003
@@ -75,4 +75,7 @@
     while (context is not None) and (context == container):
         context = getWrapperContainer(context)
 
+    if context is None:
+        return serviceManager
+
     return getServiceManager_hook(context, local=True)