mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
fix possible FileNotFoundError
old-commit-hash: 260e6aff53f5f579298f81e1d3a01a0e1d6dc7fb
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user