From 34b260256348f0d4a6597b228249686c856c75b5 Mon Sep 17 00:00:00 2001 From: Unrud Date: Mon, 7 Feb 2022 13:38:36 +0100 Subject: [PATCH] Ignore configuration file if access denied Fixes #1215 Bug was introduced in 4c44940ec12a9178efc0cffcd5b0cc61bec3f39a --- radicale/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicale/config.py b/radicale/config.py index 64dc5cc5..a9b7d7f2 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -283,7 +283,8 @@ 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 not ignore_if_missing or not isinstance(e, FileNotFoundError): + if not (ignore_if_missing and + isinstance(e, (FileNotFoundError, PermissionError))): raise RuntimeError("Failed to load %s: %s" % (config_source, e) ) from e config = Configuration.SOURCE_MISSING