fix possible FileNotFoundError

old-commit-hash: 260e6aff53
commatwo_master
Adeeb Shihadeh 5 years ago
parent 59a5c1f5e0
commit 982aacb28d
  1. 2
      selfdrive/controls/controlsd.py

@ -76,7 +76,7 @@ class Controls:
internet_needed or not openpilot_enabled_toggle internet_needed or not openpilot_enabled_toggle
# detect sound card presence and ensure successful init # 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') and open('/proc/asound/card0/state').read().strip() == 'ONLINE')
car_recognized = self.CP.carName != 'mock' car_recognized = self.CP.carName != 'mock'

Loading…
Cancel
Save