From 76671495b4a3c9419743a774b1489ed9a4285ce0 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 7 Feb 2023 20:20:40 +0000 Subject: [PATCH] Fix startup crash if config does not yet exist Fixes #14. --- devine/core/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/devine/core/config.py b/devine/core/config.py index 92069e9..36c2e98 100644 --- a/devine/core/config.py +++ b/devine/core/config.py @@ -74,6 +74,9 @@ class Config: # noinspection PyProtectedMember -config = Config.from_yaml(Config._Directories.user_configs / Config._Filenames.root_config) +try: + config = Config.from_yaml(Config._Directories.user_configs / Config._Filenames.root_config) +except FileNotFoundError: + config = Config() __ALL__ = (config,)