Handle playback failure

This commit is contained in:
Philip Trauner 2017-04-22 19:56:04 +02:00 committed by GitHub
parent ae93513fb8
commit fc95b26c45

View file

@ -151,7 +151,10 @@ class SensorReadout:
class Identify(Pipe):
def run(self, data, peer, handler):
Utils.play_sound(config.identify_sound)
try:
Utils.play_sound(config.identify_sound)
except Utils.PlaybackFailure:
Logging.error("Could not play identification sound")
Logging.success("I was identified!")