[Zope-Checkins] CVS: Zope/lib/python/ZServer - datatypes.py:1.2.8.2
component.xml:1.3.8.2
Andreas Jung
andreas at andreas-jung.com
Fri May 28 02:13:24 EDT 2004
Update of /cvs-repository/Zope/lib/python/ZServer
In directory cvs.zope.org:/tmp/cvs-serv2745/lib/python/ZServer
Modified Files:
Tag: Zope-2_7-branch
datatypes.py component.xml
Log Message:
- Collector #1293: missing 'address' parameters within one of the server
sections raises an exception.
=== Zope/lib/python/ZServer/datatypes.py 1.2.8.1 => 1.2.8.2 ===
--- Zope/lib/python/ZServer/datatypes.py:1.2.8.1 Wed Oct 1 13:21:49 2003
+++ Zope/lib/python/ZServer/datatypes.py Fri May 28 02:13:23 2004
@@ -16,6 +16,8 @@
Each server type is represented by a ServerFactory instance.
"""
+import ZConfig
+
class ServerFactory:
def __init__(self, address=None):
if address is None:
@@ -51,6 +53,10 @@
class HTTPServerFactory(ServerFactory):
def __init__(self, section):
+ if not section.address:
+ raise ZConfig.ConfigurationError(
+ "No 'address' settings found "
+ "within the 'http-server' or 'webdav-source-server' section")
ServerFactory.__init__(self, section.address)
self.force_connection_close = section.force_connection_close
# webdav-source-server sections won't have webdav_source_clients:
@@ -83,6 +89,10 @@
class FTPServerFactory(ServerFactory):
def __init__(self, section):
+ if not section.address:
+ raise ZConfig.ConfigurationError(
+ "No 'address' settings found "
+ "within the 'ftp-server' section")
ServerFactory.__init__(self, section.address)
def create(self):
=== Zope/lib/python/ZServer/component.xml 1.3.8.1 => 1.3.8.2 ===
--- Zope/lib/python/ZServer/component.xml:1.3.8.1 Thu May 27 14:34:09 2004
+++ Zope/lib/python/ZServer/component.xml Fri May 28 02:13:23 2004
@@ -11,7 +11,7 @@
<sectiontype name="http-server"
datatype=".HTTPServerFactory"
implements="ZServer.server">
- <key name="address" datatype="inet-address" default="8080"/>
+ <key name="address" datatype="inet-address"/>
<key name="force-connection-close" datatype="boolean" default="off"/>
<key name="webdav-source-clients">
<description>
@@ -24,7 +24,7 @@
<sectiontype name="webdav-source-server"
datatype=".WebDAVSourceServerFactory"
implements="ZServer.server">
- <key name="address" datatype="inet-address" default="9080"/>
+ <key name="address" datatype="inet-address"/>
<key name="force-connection-close" datatype="boolean" default="off"/>
</sectiontype>
@@ -42,7 +42,7 @@
<sectiontype name="ftp-server"
datatype=".FTPServerFactory"
- implements="ZServer.server" default="8021">
+ implements="ZServer.server">
<key name="address" datatype="inet-address"/>
</sectiontype>
More information about the Zope-Checkins
mailing list