Sounds available isdir -> isfile

old-commit-hash: 41da10ff38abfb29c42e66250344176da14e2f65
This commit is contained in:
Willem Melching
2020-05-21 14:46:18 -07:00
parent 12d3366c55
commit e57247be9d
+1 -1
View File
@@ -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/state') \
sounds_available = not os.path.isfile('/EON') or (os.path.isfile('/proc/asound/card0/state') \
and open('/proc/asound/card0/state').read().strip() == 'ONLINE')
car_recognized = self.CP.carName != 'mock'