[ZCM] [ZC] 1052/ 2 Resolve "zconfig problem: using comments at the end of the line doesn't work (at least not for http-address parameter)"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Oct 21 10:56:17 EDT 2003


Issue #1052 Update (Resolve) "zconfig problem: using comments at the end of the line doesn't work (at least not for http-address parameter)"
 Status Resolved, Zope/bug low
To followup, visit:
  http://collector.zope.org/Zope/1052

==============================================================
= Resolve - Entry #2 by mcdonc on Oct 21, 2003 10:56 am

 Status: Pending => Resolved

This is true.  Comments are only allowed at the beginning of a line.  I have added a comment to the default config file to this effect.

________________________________________
= Request - Entry #1 by Anonymous User on Sep 21, 2003 9:23 am

I thought using a comment was allowed in the zope-config, but the lines:

<pre>
&lt;http-server&gt;
  # valid keys are "address" and "force-connection-close"
  address 8270 # default 8080
  # force-connection-close on
&lt;/http-server&gt;
</pre>

in my etc/zope.conf

gave the following traceback:

<pre>
Traceback (most recent call last):
  File "/home/zope/aap/work/lib/python/Zope/Startup/run.py", line 27, in ?
    run()
  File "/home/zope/aap/work/lib/python/Zope/Startup/run.py", line 24, in run
    start_zope(opts.configroot)
  File "/home/zope/aap/work/lib/python/Zope/Startup/__init__.py", line 45, in start_zope
    starter.setupServers()
  File "/home/zope/aap/work/lib/python/Zope/Startup/__init__.py", line 184, in setupServers
    servers.append(server.create())
  File "/home/zope/aap/work/lib/python/ZServer/datatypes.py", line 69, in create
    logger_object=access_logger)
  File "/home/zope/aap/work/lib/python/ZServer/HTTPServer.py", line 380, in __init__
    http_server.__init__(self, ip, port, resolver, logger_object)
  File "/home/zope/aap/work/lib/python/ZServer/medusa/http_server.py", line 573, in __init__
    self.bind ((ip, port))
  File "/usr/local/lib/python2.3/asyncore.py", line 300, in bind
    return self.socket.bind(addr)
  File "<string>", line 1, in bind
TypeError: an integer is required
</pre>

Solution:

- strip of everything after a #-sign in the config paramters, to make zconfig behaviour similar to python behaviour

- maybe document it in zconfig-docs that this is not allowed
==============================================================




More information about the Zope-Collector-Monitor mailing list