Skip to content

Commit

Permalink
use generator express
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Jan 12, 2022
1 parent fbf7318 commit e45850c
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 @@ -314,7 +314,7 @@ def update_events(self, CS):
for m in messaging.drain_sock(self.log_sock, wait_for_one=False):
try:
msg = m.androidLog.message
if any(err in msg for err in ["ERROR_CRC", "ERROR_ECC", "ERROR_STREAM_UNDERFLOW", "APPLY FAILED"]):
if any(err in msg for err in ("ERROR_CRC", "ERROR_ECC", "ERROR_STREAM_UNDERFLOW", "APPLY FAILED")):
csid = msg.split("CSID:")[-1].split(" ")[0]
if (evt := CSID_MAP.get(csid, None)) is not None:
self.events.add(evt)
Expand Down

0 comments on commit e45850c

Please sign in to comment.