From 7722d14b8923ad21e65adeca4df3a2786e6d47fa Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Mon, 9 Feb 2026 02:55:06 -0500 Subject: [PATCH] Reapply "[TIZI/TICI] ui: drive stat cache is a json already" This reverts commit 043eab56204ac3b915fbaa24fbc16a7d2420b9d4. --- selfdrive/ui/sunnypilot/layouts/settings/trips.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/ui/sunnypilot/layouts/settings/trips.py b/selfdrive/ui/sunnypilot/layouts/settings/trips.py index 185b0adc4d..b389892d5d 100644 --- a/selfdrive/ui/sunnypilot/layouts/settings/trips.py +++ b/selfdrive/ui/sunnypilot/layouts/settings/trips.py @@ -4,7 +4,6 @@ Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. This file is part of sunnypilot and is licensed under the MIT License. See the LICENSE.md file in the root directory for more details. """ -import json import requests import threading import time @@ -54,7 +53,7 @@ class TripsLayout(Widget): if not stats: return {} try: - return json.loads(stats) + return stats except Exception: cloudlog.exception(f"Failed to decode drive stats: {stats}") return {}