Handle playback failure
This commit is contained in:
parent
ae93513fb8
commit
fc95b26c45
1 changed files with 5 additions and 2 deletions
|
@ -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!")
|
||||
|
||||
|
||||
|
@ -354,4 +357,4 @@ try:
|
|||
ws.connect()
|
||||
ws.run_forever()
|
||||
except KeyboardInterrupt:
|
||||
ws.close()
|
||||
ws.close()
|
||||
|
|
Reference in a new issue