forked from platypush/platypush
_get_camera should first verify both that camera is not null and not
closed before returning the cached object
This commit is contained in:
parent
5ca8ee594f
commit
b599c622c4
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ class CameraPiPlugin(CameraPlugin):
|
||||||
|
|
||||||
# noinspection PyUnresolvedReferences,PyPackageRequirements
|
# noinspection PyUnresolvedReferences,PyPackageRequirements
|
||||||
def _get_camera(self, **opts):
|
def _get_camera(self, **opts):
|
||||||
if self._camera:
|
if self._camera and not self._camera.closed:
|
||||||
return self._camera
|
return self._camera
|
||||||
|
|
||||||
import picamera
|
import picamera
|
||||||
|
|
Loading…
Reference in a new issue