Skip to content

Commit

Permalink
Remove unneded use of replace, causing json to fail loading the alert
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Oct 18, 2019
1 parent 23dfde1 commit 7a2addf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7a2addf

Please sign in to comment.