From e00de7145f1af4115c5d562e8641d1efbd5961f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 30 Aug 2016 18:05:22 +0200 Subject: [PATCH] Fixed some indentation --- src/octoprint/server/api/timelapse.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/octoprint/server/api/timelapse.py b/src/octoprint/server/api/timelapse.py index eaf00639..09d4d362 100644 --- a/src/octoprint/server/api/timelapse.py +++ b/src/octoprint/server/api/timelapse.py @@ -150,19 +150,19 @@ def setTimelapseConfig(): return make_response("Invalid value for interval: %d" % interval) if "retractionZHop" in request.values: - config["options"] = { - "retractionZHop": 0 - } + config["options"] = { + "retractionZHop": 0 + } - try: - retractionZHop = float(request.values["retractionZHop"]) - except ValueError: - return make_response("Invalid value for retraction Z-Hop: %r" % request.values["retractionZHop"]) - else: - if retractionZHop > 0: - config["options"]["retractionZHop"] = retractionZHop - else: - return make_response("Invalid value for retraction Z-Hop: %d" % retractionZHop) + try: + retractionZHop = float(request.values["retractionZHop"]) + except ValueError: + return make_response("Invalid value for retraction Z-Hop: %r" % request.values["retractionZHop"]) + else: + if retractionZHop > 0: + config["options"]["retractionZHop"] = retractionZHop + else: + return make_response("Invalid value for retraction Z-Hop: %d" % retractionZHop) if admin_permission.can() and "save" in data and data["save"] in valid_boolean_trues: octoprint.timelapse.configure_timelapse(config, True)