Further error handling changes

This commit is contained in:
Balthasar Reuter
2018-04-18 00:04:45 +02:00
parent e296d7997c
commit f3ad5bc7ff
3 changed files with 17 additions and 4 deletions

View File

@@ -83,6 +83,14 @@ class Photobooth:
except RuntimeError as e:
print('Camera error: ' + str(e))
self._send.send( gui.ErrorState('Camera error', str(e)) )
event = recv.recv()
if str(event) == 'cancel':
return 1
elif str(event) == 'ack':
pass
else:
print('Unknown event received: ' + str(event))
raise RuntimeError('Unknown event received', str(event))
return 0