summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2024-05-21 15:29:45 +0200
committervg <vgm+dev@devys.org>2024-05-21 15:29:45 +0200
commit34345e1ced10f1da6461e428acd04f3f6f1b0622 (patch)
tree9c1bbe4307a8e8bf66c86a734d8a0bc5065c4f60
parent3ee9e5d90e114546e843a933b02d47cf62bf38f2 (diff)
downloadgamechest-34345e1ced10f1da6461e428acd04f3f6f1b0622.tar.gz
gamechest-34345e1ced10f1da6461e428acd04f3f6f1b0622.tar.bz2
gamechest-34345e1ced10f1da6461e428acd04f3f6f1b0622.zip
git-sync on seele
-rw-r--r--gamechestcli/gamechest/gameconfig.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gamechestcli/gamechest/gameconfig.py b/gamechestcli/gamechest/gameconfig.py
index f1a06c7..0b3d855 100644
--- a/gamechestcli/gamechest/gameconfig.py
+++ b/gamechestcli/gamechest/gameconfig.py
@@ -39,6 +39,8 @@ class GameConfig:
stack.enter_context(contextlib.suppress(FileNotFoundError))
fdin = stack.enter_context(open(game_config_filepath, 'r',
encoding='utf8'))
+ # in case yaml file is empty, None will be returned, in this case
+ # fallback to empty dict.
self.config = yaml.safe_load(fdin) or {}
self.config = {
**DEFAULT_CONFIG_DICT,