Merge pull request #618 from Unrud/config_file_wsgi
Fail when config file doesn't exist in WSGI and FCGI scripts
This commit is contained in:
commit
43ac218243
@ -31,7 +31,10 @@ from flup.server.fcgi import WSGIServer
|
||||
from radicale import Application, config, log
|
||||
|
||||
|
||||
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
|
||||
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)
|
||||
|
@ -25,7 +25,10 @@ import os
|
||||
from radicale import Application, config, log
|
||||
|
||||
|
||||
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user