mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-05 02:35:41 +08:00
Reapply "[TIZI/TICI] ui: drive stat cache is a json already"
This reverts commit 043eab5620.
This commit is contained in:
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user