Catch exceptions if pausing an inactive stream

This commit is contained in:
Joel Collins 2019-01-16 14:05:47 +00:00
parent 1d1b501cbf
commit 226e787cc2

View file

@ -359,7 +359,10 @@ class StreamingCamera(BaseCamera):
resolution = self.config['image_resolution']
# Stop the camera video recording on port 1
self.camera.stop_recording(splitter_port=splitter_port)
try:
self.camera.stop_recording(splitter_port=splitter_port)
except picamera.exc.PiCameraNotRecording:
logging.info("Not recording on splitter_port {}".format(splitter_port))
# Increase the resolution for taking an image
self.camera.resolution = resolution