Don't propagate the exception if stop_preview failed

This commit is contained in:
Fabio Manganiello 2019-08-16 18:49:15 +02:00
parent 6465a6f282
commit 3c675b296f
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,10 @@ class CameraPiPlugin(CameraPlugin):
Stop camera preview.
"""
camera = self._get_camera()
camera.stop_preview()
try:
camera.stop_preview()
except Exception as e:
self.logger.warning(str(e))
@action
def take_picture(self, image_file, preview=False, warmup_time=2, resize=None, **opts):