From c8f1d4c2a433fc8ef97258826d17dbf07da942cd Mon Sep 17 00:00:00 2001 From: Numerlor Date: Thu, 13 Jan 2022 18:04:24 +0100 Subject: [PATCH] Ignore config file not existing on load --- auto_neutron/settings/toml_settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_neutron/settings/toml_settings.py b/auto_neutron/settings/toml_settings.py index 216cd967..d9a98dbc 100644 --- a/auto_neutron/settings/toml_settings.py +++ b/auto_neutron/settings/toml_settings.py @@ -50,7 +50,9 @@ class TOMLSettings: def __init__(self, file_path: Path): self.path = file_path - self.load_from_file() + self._settings_dict = RecursiveDefaultDict() + with suppress(FileNotFoundError): + self.load_from_file() # region value @t.overload