[Zope3-checkins] CVS: Zope3/src/zope/app/process - bootstrap.py:1.11
Anthony Baxter
anthony at interlink.com.au
Sat Feb 7 01:51:14 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/process
In directory cvs.zope.org:/tmp/cvs-serv941
Modified Files:
bootstrap.py
Log Message:
If the site manager has chosen to disable a core service (one of the
ones checked at bootstrap), don't just go and add another one when
it restarts. That's rather rude.
=== Zope3/src/zope/app/process/bootstrap.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/process/bootstrap.py:1.10 Mon Oct 20 14:41:15 2003
+++ Zope3/src/zope/app/process/bootstrap.py Sat Feb 7 01:51:13 2004
@@ -108,8 +108,14 @@
Returns the name added or None if nothing was added.
"""
if not self.service_manager.queryLocalService(service_type):
- return addConfigureService(self.root_folder, service_type,
- service_factory, **kw)
+ # The site-manager may have chosen to disable one of the
+ # core services. Their loss. The alternative is that when
+ # they restart, they get a new service of the one that
+ # they chose to disable.
+ reg = self.service_manager.queryRegistrations(service_type)
+ if reg is None:
+ return addConfigureService(self.root_folder, service_type,
+ service_factory, **kw)
else:
return None
More information about the Zope3-Checkins
mailing list