Fix startup crash if config is blank

Fixes #20.
This commit is contained in:
rlaphoenix 2023-02-07 20:32:40 +00:00
parent 76671495b4
commit f7683173f8
1 changed files with 1 additions and 1 deletions

View File

@ -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