From 7a2addf782bc821c8b08adfd7dc006839aab24b6 Mon Sep 17 00:00:00 2001 From: Riccardo Date: Fri, 18 Oct 2019 11:29:59 -0700 Subject: [PATCH] Remove unneded use of replace, causing json to fail loading the alert --- selfdrive/controls/controlsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 2e7753614ae31d..8197cbf0347668 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -511,7 +511,7 @@ def controlsd_thread(sm=None, pm=None, can_sock=None): # FIXME: offroad alerts should not be created with negative severity connectivity_alert = params.get("Offroad_ConnectivityNeeded", encoding='utf8') - internet_needed = connectivity_alert is not None and json.loads(connectivity_alert.replace("'", "\""))["severity"] >= 0 + internet_needed = connectivity_alert is not None and json.loads(connectivity_alert)["severity"] >= 0 prof = Profiler(False) # off by default