From 571abfb7ee4b5450d28fb47e47af004b51375b7a Mon Sep 17 00:00:00 2001 From: TabulateJarl8 Date: Wed, 3 Jan 2024 00:31:14 -0500 Subject: [PATCH] fix JSONDecodeError in anti cheat loader --- pyproject.toml | 2 +- vapor/api_interface.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a4fed70..9f1d093 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vapor-steam" -version = "1.4.0" +version = "1.4.1" description = "TUI program to check the ProtonDB compatibility of all the games of a Steam user." authors = ["TabulateJarl8 "] license = "GPLv3" diff --git a/vapor/api_interface.py b/vapor/api_interface.py index d45cc5a..18b05ea 100644 --- a/vapor/api_interface.py +++ b/vapor/api_interface.py @@ -81,7 +81,11 @@ async def get_anti_cheat_data() -> Cache | None: if data.status != 200: return None - anti_cheat_data = json.loads(data.data) + try: + anti_cheat_data = json.loads(data.data) + except json.JSONDecodeError: + return None + deserialized_data = [ AntiCheatData( app_id=game['storeIds']['steam'],