[F] Fix config upgrade error
This commit is contained in:
parent
eb76b2f474
commit
8d3a3cc7f0
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@ def check_config() -> Config:
|
||||||
:return: Config object
|
:return: Config object
|
||||||
"""
|
"""
|
||||||
if CONFIG_PATH.is_file():
|
if CONFIG_PATH.is_file():
|
||||||
return Config.from_dict(json.loads(CONFIG_PATH.read_text('utf-8')))
|
try:
|
||||||
|
return Config.from_dict(json.loads(CONFIG_PATH.read_text('utf-8')))
|
||||||
|
except KeyError:
|
||||||
|
return create_config()
|
||||||
|
|
||||||
return create_config()
|
return create_config()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue