Fail when config file doesn't exist in WSGI and FCGI scripts
This commit is contained in:
parent
91e49986ee
commit
f971ca0262
@ -31,7 +31,10 @@ from flup.server.fcgi import WSGIServer
|
|||||||
from radicale import Application, config, log
|
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"))
|
filename = os.path.expanduser(configuration.get("logging", "config"))
|
||||||
debug = configuration.getboolean("logging", "debug")
|
debug = configuration.getboolean("logging", "debug")
|
||||||
logger = log.start("radicale", filename, debug)
|
logger = log.start("radicale", filename, debug)
|
||||||
|
@ -25,7 +25,10 @@ import os
|
|||||||
from radicale import Application, config, log
|
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"))
|
filename = os.path.expanduser(configuration.get("logging", "config"))
|
||||||
debug = configuration.getboolean("logging", "debug")
|
debug = configuration.getboolean("logging", "debug")
|
||||||
logger = log.start("radicale", filename, debug)
|
logger = log.start("radicale", filename, debug)
|
||||||
|
Loading…
Reference in New Issue
Block a user