Use simpler syntax for I/O operations

This commit is contained in:
kramo
2023-04-01 16:14:19 +02:00
parent 3bcbf8457c
commit 6899246d01
7 changed files with 12 additions and 20 deletions

View File

@@ -277,8 +277,7 @@ def create_details_window(parent_widget, game_id=None):
path = parent_widget.data_dir / "cartridges" / "games" / f"{game_id}.json"
if path.exists():
with open(path, "r") as open_file:
data = json.loads(open_file.read())
data = json.loads(path.read_text())
data.update(values)
save_game(parent_widget, data)
else: