Fix FCGI and WSGI scripts
This commit is contained in:
parent
7a7e67106a
commit
5b5edaac2f
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user