[Zope3-checkins] CVS: Zope3/src/zope/app/process - bootstrap.py:1.5

Jim Fulton jim@zope.com
Fri, 11 Jul 2003 03:16:59 -0400


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

Modified Files:
	bootstrap.py 
Log Message:
Added a workaround for the fact that STEPHAN changed the name of the 
event subscription service, thus deregistering my existing service.


=== Zope3/src/zope/app/process/bootstrap.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/process/bootstrap.py:1.4	Fri Jul 11 01:50:44 2003
+++ Zope3/src/zope/app/process/bootstrap.py	Fri Jul 11 03:16:55 2003
@@ -19,6 +19,8 @@
 
 $Id$
 """
+
+from zope.app import zapi
 from transaction import get_transaction
 from zope.interface import implements
 from zope.app.interfaces.event import ISubscriber
@@ -132,7 +134,11 @@
         name = self.ensureService(EventPublication, EventService)
         if name:
             configureService(self.root_folder, EventSubscription, name)
-
+        elif not self.service_manager.queryLocalService(EventSubscription):
+            pub = self.service_manager.queryLocalService(EventPublication)
+            name = zapi.getName(pub)
+            configureService(self.root_folder, EventSubscription, name)
+    
         # Add the HubIds service, which subscribes itself to the event service
         name = self.ensureService(HubIds, ObjectHub)
         # Add a Registration object so that the Hub has something to do.