Decrease image counter if an image could not be captured from webcam
Should keep rendering of timelapse from breaking if only a couple of images couldn't be captured due to whatever reason. Suggested by @midopple in #344
This commit is contained in:
parent
7b56b36564
commit
bf9d5efe43
1 changed files with 2 additions and 1 deletions
|
|
@ -241,7 +241,8 @@ class Timelapse(object):
|
||||||
urllib.urlretrieve(self._snapshotUrl, filename)
|
urllib.urlretrieve(self._snapshotUrl, filename)
|
||||||
self._logger.debug("Image %s captured from %s" % (filename, self._snapshotUrl))
|
self._logger.debug("Image %s captured from %s" % (filename, self._snapshotUrl))
|
||||||
except:
|
except:
|
||||||
self._logger.exception("Could not capture image %s from %s" % (filename, self._snapshotUrl))
|
self._logger.exception("Could not capture image %s from %s, decreasing image counter again" % (filename, self._snapshotUrl))
|
||||||
|
self._imageNumber -= 1
|
||||||
eventManager().fire(Events.CAPTURE_DONE, {"file": filename})
|
eventManager().fire(Events.CAPTURE_DONE, {"file": filename})
|
||||||
|
|
||||||
def _createMovie(self, success=True):
|
def _createMovie(self, success=True):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue