forked from platypush/platypush
Wrap camera stop and connection close in two distinct try-catch blocks
This commit is contained in:
parent
5cfbd75250
commit
53ba5f6628
1 changed files with 5 additions and 5 deletions
|
@ -125,11 +125,11 @@ class CameraPiBackend(Backend):
|
||||||
self.camera.wait_recording(2)
|
self.camera.wait_recording(2)
|
||||||
except ConnectionError:
|
except ConnectionError:
|
||||||
self.logger.info('Client closed connection')
|
self.logger.info('Client closed connection')
|
||||||
try:
|
try: self.stop_recording()
|
||||||
self.stop_recording()
|
except: pass
|
||||||
connection.close()
|
|
||||||
except:
|
try: connection.close()
|
||||||
pass
|
except: pass
|
||||||
|
|
||||||
self.send_camera_action(self.CameraAction.START_RECORDING)
|
self.send_camera_action(self.CameraAction.START_RECORDING)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue