From 6db8a151f83af7fcba4915ad78fc1eadb5d04af4 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Thu, 18 Oct 2018 12:58:43 -0400 Subject: [PATCH] Changed 'warning' to 'info' and added an error if trying to save video that doesn't exist --- blinkpy/camera.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blinkpy/camera.py b/blinkpy/camera.py index cb2666e..d36a5da 100644 --- a/blinkpy/camera.py +++ b/blinkpy/camera.py @@ -162,8 +162,8 @@ class BlinkCamera(): else: self.motion_detected = False except KeyError: - _LOGGER.warning("Could not extract clip info from camera %s", - self.name) + _LOGGER.info("Could not extract clip info from camera %s", + self.name) def image_to_file(self, path): """ @@ -187,6 +187,9 @@ class BlinkCamera(): """ _LOGGER.debug("Writing video from %s to %s", self.name, path) response = self._cached_video + if response is None: + _LOGGER.error("No saved video exist for %s.", self.name) + return with open(path, 'wb') as vidfile: copyfileobj(response.raw, vidfile)