소스 검색

Load no config file for --config without argument

Unrud 4 년 전
부모
커밋
4564de9f9d
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      NEWS.md
  2. 2 1
      radicale/__main__.py

+ 1 - 1
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

+ 2 - 1
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: