Fix the warning if the configuration file is not found
This commit is contained in:
parent
61d063c610
commit
8adb096de2
@ -84,10 +84,8 @@ def run():
|
|||||||
options = parser.parse_args()[0]
|
options = parser.parse_args()[0]
|
||||||
|
|
||||||
# Read in the configuration specified by the command line (if specified)
|
# Read in the configuration specified by the command line (if specified)
|
||||||
if options.config:
|
configuration_found = (
|
||||||
if not config.read(options.config):
|
config.read(options.config) if options.config else True)
|
||||||
log.LOGGER.warning(
|
|
||||||
"Configuration file '%s' not found" % options.config)
|
|
||||||
|
|
||||||
# Update Radicale configuration according to options
|
# Update Radicale configuration according to options
|
||||||
for option in parser.option_list:
|
for option in parser.option_list:
|
||||||
@ -100,6 +98,11 @@ def run():
|
|||||||
# Start logging
|
# Start logging
|
||||||
log.start()
|
log.start()
|
||||||
|
|
||||||
|
# Log a warning if the configuration file of the command line is not found
|
||||||
|
if not configuration_found:
|
||||||
|
log.LOGGER.warning(
|
||||||
|
"Configuration file '%s' not found" % options.config)
|
||||||
|
|
||||||
# Fork if Radicale is launched as daemon
|
# Fork if Radicale is launched as daemon
|
||||||
if options.daemon:
|
if options.daemon:
|
||||||
if options.pid and os.path.exists(options.pid):
|
if options.pid and os.path.exists(options.pid):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user