From 982aacb28d672daab216a059919c8ab285f380dd Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 21 May 2020 09:59:39 -0700 Subject: [PATCH] fix possible FileNotFoundError old-commit-hash: 260e6aff53f5f579298f81e1d3a01a0e1d6dc7fb --- 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 18aa2c7b28..d2cc2b8669 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -76,7 +76,7 @@ class Controls: internet_needed or not openpilot_enabled_toggle # detect sound card presence and ensure successful init - sounds_available = not os.path.isfile('/EON') or (os.path.isdir('/proc/asound/card0') \ + sounds_available = not os.path.isfile('/EON') or (os.path.isdir('/proc/asound/card0/state') \ and open('/proc/asound/card0/state').read().strip() == 'ONLINE') car_recognized = self.CP.carName != 'mock'