From f7683173f8174250987608d39af711e5d584c47a Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Tue, 7 Feb 2023 20:32:40 +0000 Subject: [PATCH] Fix startup crash if config is blank Fixes #20. --- devine/core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devine/core/config.py b/devine/core/config.py index 36c2e98..862f073 100644 --- a/devine/core/config.py +++ b/devine/core/config.py @@ -70,7 +70,7 @@ class Config: raise FileNotFoundError(f"Config file path ({path}) was not found") if not path.is_file(): raise FileNotFoundError(f"Config file path ({path}) is not to a file.") - return cls(**yaml.safe_load(path.read_text(encoding="utf8"))) + return cls(**yaml.safe_load(path.read_text(encoding="utf8")) or {}) # noinspection PyProtectedMember