[Zope-Checkins] SVN: Zope/trunk/ - Collector #1293: missing
'address' parameters within one of the server
Andreas Jung
andreas at andreas-jung.com
Fri May 28 02:18:14 EDT 2004
Log message for revision 25078:
- Collector #1293: missing 'address' parameters within one of the server
sections raises an exception.
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2004-05-28 05:46:29 UTC (rev 25077)
+++ Zope/trunk/doc/CHANGES.txt 2004-05-28 06:18:14 UTC (rev 25078)
@@ -122,8 +122,8 @@
Bugs fixed
- - Collector #1293: Added default ports for http-server, ftp-server
- and webdav-server.
+ - Collector #1293: missing 'address' parameters within one of the server
+ sections raise an exception.
- Collector #1345: AcceleratedHTTPCacheManager now sends the
Last-Modified header.
Modified: Zope/trunk/lib/python/ZServer/component.xml
===================================================================
--- Zope/trunk/lib/python/ZServer/component.xml 2004-05-28 05:46:29 UTC (rev 25077)
+++ Zope/trunk/lib/python/ZServer/component.xml 2004-05-28 06:18:14 UTC (rev 25078)
@@ -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>
@@ -43,7 +43,7 @@
<sectiontype name="ftp-server"
datatype=".FTPServerFactory"
implements="ZServer.server">
- <key name="address" datatype="inet-address" default="8021"/>
+ <key name="address" datatype="inet-address"/>
</sectiontype>
<sectiontype name="monitor-server"
Modified: Zope/trunk/lib/python/ZServer/datatypes.py
===================================================================
--- Zope/trunk/lib/python/ZServer/datatypes.py 2004-05-28 05:46:29 UTC (rev 25077)
+++ Zope/trunk/lib/python/ZServer/datatypes.py 2004-05-28 06:18:14 UTC (rev 25078)
@@ -17,8 +17,8 @@
"""
import socket
+import ZConfig
-
_default_host_info = None
def get_default_host_info():
@@ -81,6 +81,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:
@@ -113,6 +117,9 @@
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):
More information about the Zope-Checkins
mailing list