From f3ee2d2bfdb10834c9cfc9d0d66edeb2ebc5137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 5 Mar 2014 21:57:27 +0100 Subject: [PATCH] Fix for saved timelapse configs vs. new post roll setting See #384 --- src/octoprint/timelapse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/octoprint/timelapse.py b/src/octoprint/timelapse.py index b337321a..2c3b2c82 100644 --- a/src/octoprint/timelapse.py +++ b/src/octoprint/timelapse.py @@ -73,7 +73,11 @@ def configureTimelapse(config=None, persist=False): current.unload() type = config["type"] - postRoll = config["postRoll"] + + postRoll = 0 + if "postRoll" in config: + postRoll = config["postRoll"] + if type is None or "off" == type: current = None elif "zchange" == type: