whoops (#1271)
This commit is contained in:
+3
-5
@@ -2054,11 +2054,9 @@ async def process_match_summaries(new_games: List[Dict[str, Any]]) -> None:
|
||||
# Load replay JSON
|
||||
replay_path = replay_data_path(session_id)
|
||||
try:
|
||||
async with aiofiles.open(replay_path, "r", encoding="utf-8") as f:
|
||||
replay_data = json.loads(await f.read())
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
except json.JSONDecodeError:
|
||||
raw = await asyncio.to_thread(replay_path.read_bytes)
|
||||
replay_data = json.loads(gzip.decompress(raw))
|
||||
except (FileNotFoundError, OSError, json.JSONDecodeError):
|
||||
continue
|
||||
|
||||
# Translate vehicle names & sanitize
|
||||
|
||||
Reference in New Issue
Block a user