summaryrefslogtreecommitdiffstats
path: root/gamechestcli
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2026-02-28 17:51:31 +0100
committervg <vgm+dev@devys.org>2026-02-28 17:51:31 +0100
commit8e9d0ee3bed1f5aba33ec400a109ac115ff0dba5 (patch)
tree7c9ae04ac3655148cefc4eeb4bacf2a0ec98f828 /gamechestcli
parenta68f2aa0a588d7eef146e42d361755e4921683d3 (diff)
downloadgamechest-8e9d0ee3bed1f5aba33ec400a109ac115ff0dba5.tar.gz
gamechest-8e9d0ee3bed1f5aba33ec400a109ac115ff0dba5.tar.bz2
gamechest-8e9d0ee3bed1f5aba33ec400a109ac115ff0dba5.zip
git-sync on dita
Diffstat (limited to 'gamechestcli')
-rw-r--r--gamechestcli/src/gamechest/gameconfig.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gamechestcli/src/gamechest/gameconfig.py b/gamechestcli/src/gamechest/gameconfig.py
index 0b3d855..9385dfd 100644
--- a/gamechestcli/src/gamechest/gameconfig.py
+++ b/gamechestcli/src/gamechest/gameconfig.py
@@ -1,12 +1,12 @@
import contextlib
+import json
from pathlib import Path
import yaml
-from xdg import xdg_data_home, xdg_config_home
+from xdg import xdg_config_home, xdg_data_home
from . import consts
-
DEFAULT_CONFIG_DICT = {
'remote_basedir': 'jibril:/storage/games',
'gamesaves_path': Path('~/syncthing/gamesaves').expanduser(),
@@ -101,7 +101,7 @@ class GameConfig:
return games_install_path
def print_config(self):
- print(self.config)
+ print(json.dumps(self.config))
# default instance of gameconfig, same instance intended to be shared through
@@ -113,7 +113,7 @@ class GameStatus:
def load_yaml(self):
with contextlib.ExitStack() as stack:
stack.enter_context(contextlib.suppress(FileNotFoundError))
- fdin = stack.enter_context(open(self.yaml_path, 'r',
+ fdin = stack.enter_context(open(self.yaml_path,
encoding='utf8'))
data = yaml.safe_load(fdin)
self.last_loaded_profile = data.get('last_loaded_profile',