From 651df330628e02aec093ba8d13a78796f1829b29 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 17 Jan 2022 11:33:26 +0100 Subject: [PATCH] test_logcatd_android.py: catch unicode decode error old-commit-hash: fe0f9aaa4f7ceba345c30819245f62be6004d535 --- selfdrive/logcatd/tests/test_logcatd_android.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/selfdrive/logcatd/tests/test_logcatd_android.py b/selfdrive/logcatd/tests/test_logcatd_android.py index 5b908d3e87..a98ae5834d 100755 --- a/selfdrive/logcatd/tests/test_logcatd_android.py +++ b/selfdrive/logcatd/tests/test_logcatd_android.py @@ -34,7 +34,11 @@ class TestLogcatdAndroid(unittest.TestCase): self.assertTrue(m.valid) self.assertLess(time.monotonic() - (m.logMonoTime / 1e9), 30) - recv_msg = m.androidLog.message.strip() + try: + recv_msg = m.androidLog.message.strip() + except UnicodeDecodeError: + continue + if recv_msg not in sent_msgs: continue