From e3a982dbcee00d149c4bfec4ad38f5eb54df6eac Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 15 Jan 2022 22:32:36 +0100 Subject: [PATCH] Cosmetics --- radicale/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radicale/config.py b/radicale/config.py index 4b7ed8c..64dc5cc 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -283,11 +283,10 @@ def load(paths: Optional[Iterable[Tuple[str, bool]]] = None config = {s: {o: parser[s][o] for o in parser.options(s)} for s in parser.sections()} except Exception as e: - if isinstance(e, FileNotFoundError) and ignore_if_missing: - config = Configuration.SOURCE_MISSING - else: + if not ignore_if_missing or not isinstance(e, FileNotFoundError): raise RuntimeError("Failed to load %s: %s" % (config_source, e) ) from e + config = Configuration.SOURCE_MISSING configuration.update(config, config_source) return configuration