[Zope-Checkins] CVS: Zope/lib/python/ZServer - datatypes.py:1.3
Chris McDonough
chrism at zope.com
Wed Oct 1 13:23:04 EDT 2003
Update of /cvs-repository/Zope/lib/python/ZServer
In directory cvs.zope.org:/tmp/cvs-serv11968
Modified Files:
datatypes.py
Log Message:
Don't start a monitor server if there is no emergency user.
=== Zope/lib/python/ZServer/datatypes.py 1.2 => 1.3 ===
--- Zope/lib/python/ZServer/datatypes.py:1.2 Tue Mar 18 16:15:14 2003
+++ Zope/lib/python/ZServer/datatypes.py Wed Oct 1 13:23:03 2003
@@ -137,9 +137,16 @@
ServerFactory.__init__(self, section.address)
def create(self):
+ password = self.getPassword()
+ if password is None:
+ msg = ('Monitor server not started because no emergency user '
+ 'exists.')
+ import zLOG
+ zLOG.LOG("Zope", zLOG.ERROR, msg)
+ return
from ZServer.medusa.monitor import secure_monitor_server
return secure_monitor_server(hostname=self.host, port=self.port,
- password=self.getPassword())
+ password=password)
def getPassword(self):
# XXX This is really out of place; there should be a better
@@ -151,10 +158,6 @@
pw = None
else:
pw = emergency_user._getPassword()
- if pw is None:
- import zLOG
- zLOG.LOG("Zope", zLOG.WARNING, 'Monitor server not started'
- ' because no emergency user exists.')
return pw
More information about the Zope-Checkins
mailing list