Merge branch 'master' of github.com:Kozea/radicale
This commit is contained in:
commit
d9b6750145
2
config
2
config
@ -122,7 +122,7 @@
|
|||||||
# If no config is given, simple information is printed on the standard output
|
# If no config is given, simple information is printed on the standard output
|
||||||
# For more information about the syntax of the configuration file, see:
|
# For more information about the syntax of the configuration file, see:
|
||||||
# http://docs.python.org/library/logging.config.html
|
# http://docs.python.org/library/logging.config.html
|
||||||
#config = /etc/radicale/logging
|
#config =
|
||||||
|
|
||||||
# Set the default logging level to debug
|
# Set the default logging level to debug
|
||||||
#debug = False
|
#debug = False
|
||||||
|
@ -74,9 +74,12 @@ def run():
|
|||||||
group.add_argument(*args, **kwargs)
|
group.add_argument(*args, **kwargs)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.config:
|
if args.config is not None:
|
||||||
configuration = config.load()
|
configuration = config.load()
|
||||||
|
if args.config:
|
||||||
configuration_found = configuration.read(args.config)
|
configuration_found = configuration.read(args.config)
|
||||||
|
else:
|
||||||
|
configuration_found = True
|
||||||
else:
|
else:
|
||||||
configuration_paths = [
|
configuration_paths = [
|
||||||
"/etc/radicale/config",
|
"/etc/radicale/config",
|
||||||
@ -101,7 +104,8 @@ def run():
|
|||||||
|
|
||||||
# Log a warning if the configuration file of the command line is not found
|
# Log a warning if the configuration file of the command line is not found
|
||||||
if not configuration_found:
|
if not configuration_found:
|
||||||
logger.warning("Configuration file '%s' not found" % args.config)
|
logger.error("Configuration file '%s' not found" % args.config)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
serve(configuration, logger)
|
serve(configuration, logger)
|
||||||
|
@ -123,7 +123,7 @@ INITIAL_CONFIG = OrderedDict([
|
|||||||
"help": "command that is run after changes to storage"})])),
|
"help": "command that is run after changes to storage"})])),
|
||||||
("logging", OrderedDict([
|
("logging", OrderedDict([
|
||||||
("config", {
|
("config", {
|
||||||
"value": "/etc/radicale/logging",
|
"value": "",
|
||||||
"help": "logging configuration file"}),
|
"help": "logging configuration file"}),
|
||||||
("debug", {
|
("debug", {
|
||||||
"value": "False",
|
"value": "False",
|
||||||
|
Loading…
Reference in New Issue
Block a user