Catch exceptions when saving config
This commit is contained in:
parent
945c69baf0
commit
c357cfb6a5
|
@ -125,7 +125,11 @@ def load(configFolder=None):
|
||||||
except Exception:
|
except Exception:
|
||||||
settings = deepcopy(DEFAULTS)
|
settings = deepcopy(DEFAULTS)
|
||||||
|
|
||||||
if check(settings) > 0: save(settings, configFolder) # Check the settings and save them if something changed
|
if check(settings) > 0:
|
||||||
|
try:
|
||||||
|
save(settings, configFolder) # Check the settings and save them if something changed
|
||||||
|
except:
|
||||||
|
print(f"Error saving config file {configFile.name}, continuing without saving.")
|
||||||
return settings
|
return settings
|
||||||
|
|
||||||
def check(settings):
|
def check(settings):
|
||||||
|
|
Loading…
Reference in New Issue