Move WSGI initialization into module
This commit is contained in:
@@ -26,16 +26,8 @@ WSGI-to-FastCGI mapper.
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
from flup.server.fcgi import WSGIServer
|
||||
from radicale import Application, config, log
|
||||
from radicale import application
|
||||
|
||||
|
||||
config_paths = []
|
||||
if os.environ.get("RADICALE_CONFIG"):
|
||||
config_paths.append(os.environ["RADICALE_CONFIG"])
|
||||
configuration = config.load(config_paths, ignore_missing_paths=False)
|
||||
filename = os.path.expanduser(configuration.get("logging", "config"))
|
||||
debug = configuration.getboolean("logging", "debug")
|
||||
logger = log.start("radicale", filename, debug)
|
||||
WSGIServer(Application(configuration, logger)).run()
|
||||
WSGIServer(application).run()
|
||||
|
||||
Reference in New Issue
Block a user