Commit ea10d4a3 authored by Aurel's avatar Aurel

make load of config work with zope2

parent e1f3c7f5
...@@ -161,7 +161,10 @@ def runwsgi(): ...@@ -161,7 +161,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__)
if os.path.isfile(os.path.join(startup, 'wsgischema.xml')):
schema = ZConfig.loadSchema(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)
...@@ -173,9 +176,9 @@ def runwsgi(): ...@@ -173,9 +176,9 @@ 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),
).run() ).run()
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