Don't propagate the exception if stop_preview failed
This commit is contained in:
parent
6465a6f282
commit
3c675b296f
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,10 @@ class CameraPiPlugin(CameraPlugin):
|
||||||
Stop camera preview.
|
Stop camera preview.
|
||||||
"""
|
"""
|
||||||
camera = self._get_camera()
|
camera = self._get_camera()
|
||||||
camera.stop_preview()
|
try:
|
||||||
|
camera.stop_preview()
|
||||||
|
except Exception as e:
|
||||||
|
self.logger.warning(str(e))
|
||||||
|
|
||||||
@action
|
@action
|
||||||
def take_picture(self, image_file, preview=False, warmup_time=2, resize=None, **opts):
|
def take_picture(self, image_file, preview=False, warmup_time=2, resize=None, **opts):
|
||||||
|
|
Loading…
Reference in a new issue