From 8e9d0ee3bed1f5aba33ec400a109ac115ff0dba5 Mon Sep 17 00:00:00 2001 From: vg Date: Sat, 28 Feb 2026 17:51:31 +0100 Subject: git-sync on dita --- gamechestcli/src/gamechest/gameconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gamechestcli') 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', -- cgit v1.2.3