Reapply "[TIZI/TICI] ui: drive stat cache is a json already"

This reverts commit 043eab5620.
This commit is contained in:
Jason Wen
2026-02-09 02:55:06 -05:00
parent 043eab5620
commit 7722d14b89
@@ -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 {}