If the server is only translating, don't init the httpd.

When the server is about to run normally, httpd must be created before
the addons, so that they use it. However, if only translating, httpd may
not exist at all. Sometimes it /cannnot/ exist, because another server
may be running at the same port.

bzr revid: p_christ@hol.gr-20090905081157-8943pfwve7b0g7xl
This commit is contained in:
P. Christeas 2009-09-05 11:11:57 +03:00
parent a17a31abe1
commit 58323aa31a
1 changed files with 7 additions and 4 deletions

View File

@ -114,11 +114,14 @@ import addons
import service.http_server
service.http_server.init_servers()
service.http_server.init_xmlrpc()
if not ( tools.config["stop_after_init"] or \
tools.config["translate_in"] or \
tools.config["translate_out"] ):
service.http_server.init_servers()
service.http_server.init_xmlrpc()
import service.netrpc_server
service.netrpc_server.init_servers()
import service.netrpc_server
service.netrpc_server.init_servers()
if tools.config['db_name']:
for db in tools.config['db_name'].split(','):