Fixed some indentation

This commit is contained in:
Gina Häußge 2016-08-30 18:05:22 +02:00
parent a13e12bb5e
commit e00de7145f

View file

@ -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)