parent
2b8f4b9419
commit
c14defcba8
@ -283,8 +283,8 @@ def load(paths: Optional[Iterable[Tuple[str, bool]]] = None
|
|||||||
config = {s: {o: parser[s][o] for o in parser.options(s)}
|
config = {s: {o: parser[s][o] for o in parser.options(s)}
|
||||||
for s in parser.sections()}
|
for s in parser.sections()}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if not (ignore_if_missing and
|
if not (ignore_if_missing and isinstance(e, (
|
||||||
isinstance(e, (FileNotFoundError, PermissionError))):
|
FileNotFoundError, NotADirectoryError, PermissionError))):
|
||||||
raise RuntimeError("Failed to load %s: %s" % (config_source, e)
|
raise RuntimeError("Failed to load %s: %s" % (config_source, e)
|
||||||
) from e
|
) from e
|
||||||
config = Configuration.SOURCE_MISSING
|
config = Configuration.SOURCE_MISSING
|
||||||
|
Loading…
Reference in New Issue
Block a user