From 4564de9f9d3af9642afc69aace18584becf0f943 Mon Sep 17 00:00:00 2001 From: Unrud Date: Fri, 24 Dec 2021 18:13:18 +0100 Subject: [PATCH] Load no config file for --config without argument --- NEWS.md | 2 +- radicale/__main__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2f3778d..8206a12 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,7 +13,7 @@ * Disallow abbreviated arguments * Support backend specific options and HTTP headers * Optional argument for boolean options - * Require argument for `--config` + * Load no config file for `--config` without argument * Allow float for server->timeout setting * Fix **is-not-defined** filter in **addressbook-query** report * Add python type hints diff --git a/radicale/__main__.py b/radicale/__main__.py index aa3382f..747dc49 100644 --- a/radicale/__main__.py +++ b/radicale/__main__.py @@ -155,7 +155,8 @@ def run() -> None: configuration = config.load(config.parse_compound_paths( config.DEFAULT_CONFIG_PATH, os.environ.get("RADICALE_CONFIG"), - os.pathsep.join(args_ns.config) if args_ns.config else None)) + os.pathsep.join(args_ns.config) if args_ns.config is not None + else None)) if arguments_config: configuration.update(arguments_config, "command line arguments") except Exception as e: