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]
|
||||
|
||||
# Read in the configuration specified by the command line (if specified)
|
||||
if options.config:
|
||||
if not config.read(options.config):
|
||||
log.LOGGER.warning(
|
||||
"Configuration file '%s' not found" % options.config)
|
||||
configuration_found = (
|
||||
config.read(options.config) if options.config else True)
|
||||
|
||||
# Update Radicale configuration according to options
|
||||
for option in parser.option_list:
|
||||
@ -100,6 +98,11 @@ def run():
|
||||
# Start logging
|
||||
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
|
||||
if options.daemon:
|
||||
if options.pid and os.path.exists(options.pid):
|
||||
|
Loading…
x
Reference in New Issue
Block a user