Create blank config if it did not exist

This commit is contained in:
rlaphoenix 2023-02-25 23:00:50 +00:00
parent 570e0aba00
commit 7958ad5e7c
1 changed files with 4 additions and 4 deletions

View File

@ -74,9 +74,9 @@ class Config:
# noinspection PyProtectedMember
try:
config = Config.from_yaml(Config._Directories.user_configs / Config._Filenames.root_config)
except FileNotFoundError:
config = Config()
config_path = Config._Directories.user_configs / Config._Filenames.root_config
if not config_path.is_file():
config_path.write_text("")
config = Config.from_yaml(config_path)
__ALL__ = (config,)