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)
|
||||
except ConnectionError:
|
||||
self.logger.info('Client closed connection')
|
||||
try:
|
||||
self.stop_recording()
|
||||
connection.close()
|
||||
except:
|
||||
pass
|
||||
try: self.stop_recording()
|
||||
except: pass
|
||||
|
||||
try: connection.close()
|
||||
except: pass
|
||||
|
||||
self.send_camera_action(self.CameraAction.START_RECORDING)
|
||||
|
||||
|
|
Loading…
Reference in a new issue