Commit 8a6408a4 authored by Aurel's avatar Aurel Committed by Arnaud Fontaine

make load of config work with zope2

parent fa074165
...@@ -167,7 +167,10 @@ def runwsgi(): ...@@ -167,7 +167,10 @@ def runwsgi():
args = parser.parse_args() args = parser.parse_args()
startup = os.path.dirname(Zope2.Startup.__file__) startup = os.path.dirname(Zope2.Startup.__file__)
schema = ZConfig.loadSchema(os.path.join(startup, 'wsgischema.xml')) if os.path.isfile(os.path.join(startup, 'wsgischema.xml')):
schema = ZConfig.loadSchema(os.path.join(startup, 'wsgischema.xml'))
else: # BBB
schema = ZConfig.loadSchema(os.path.join(startup, 'zopeschema.xml'))
conf, _ = ZConfig.loadConfig(schema, args.zope_conf) conf, _ = ZConfig.loadConfig(schema, args.zope_conf)
make_wsgi_app({}, zope_conf=args.zope_conf) make_wsgi_app({}, zope_conf=args.zope_conf)
...@@ -190,11 +193,11 @@ def runwsgi(): ...@@ -190,11 +193,11 @@ def runwsgi():
port = int(port) port = int(port)
createServer( createServer(
app_wrapper( app_wrapper(
large_file_threshold=conf.large_file_threshold, large_file_threshold=getattr(conf, 'large_file_threshold', None),
webdav_ports=[port] if args.webdav else ()), webdav_ports=[port] if args.webdav else ()),
listen=args.address, listen=args.address,
logger=logging.getLogger("access"), logger=logging.getLogger("access"),
threads=conf.zserver_threads, threads=getattr(conf, 'zserver_threads', None),
asyncore_use_poll=True, asyncore_use_poll=True,
# Prevent waitress from adding its own Via and Server response headers. # Prevent waitress from adding its own Via and Server response headers.
ident=None, ident=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment