mirror of https://github.com/devine-dl/devine.git
Create blank config if it did not exist
This commit is contained in:
parent
570e0aba00
commit
7958ad5e7c
|
@ -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,)
|
||||
|
|
Loading…
Reference in New Issue