Fix FCGI and WSGI scripts

This commit is contained in:
Guillaume Ayoub 2016-07-01 10:28:51 +02:00
parent 7a7e67106a
commit 5b5edaac2f
3 changed files with 9 additions and 9 deletions

View File

@ -24,11 +24,11 @@ Launch a Radicale FastCGI server according to configuration.
"""
import os
import radicale
from flipflop import WSGIServer
from radicale import Application, config, log
configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
logger = radicale.log.start()
WSGIServer(radicale.Application(configuration, logger)).run()
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
logger = log.start()
WSGIServer(Application(configuration, logger)).run()

View File

@ -22,9 +22,9 @@ Radicale WSGI file (mod_wsgi and uWSGI compliant).
"""
import os
import radicale
from radicale import Application, config, log
configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
logger = radicale.log.start()
application = radicale.Application(configuration, logger)
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
logger = log.start()
application = Application(configuration, logger)

View File

@ -41,7 +41,7 @@ def configure_from_file(filename, debug, logger):
def start(name="radicale", filename=None, debug=False):
"""Start the logging according to the configuration."""
logger = logging.getLogger(name)
if os.path.exists(filename):
if filename and os.path.exists(filename):
# Configuration taken from file
configure_from_file(logger, filename, debug)
# Reload config on SIGHUP (UNIX only)