Fix a bug causing the update of OctoPrint to not work under certain circumstances
The bug only manifests if a user had installed 1.2.16 earlier and never once hit "Save" in the settings before attempting to update to 1.2.17. With 1.2.16 the updater script and settings for OctoPrint's own update mechanism were changed to prefer "checkout_folder" instead of "update_folder". In earlier versions however "update_folder" was still used. Saving settings even once (even without any changes!) will migrate the data. But if that's not done a KeyError will be raised when trying to retrieve "update_folder" from the check config, with "checkout_folder" as its fallback. Rather stupid error really.
This commit is contained in:
parent
28de87441f
commit
3d26e478e3
1 changed files with 1 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ def perform_update(target, check, target_version):
|
|||
update_script = check["update_script"]
|
||||
update_branch = check.get("update_branch", "")
|
||||
force_exact_version = check.get("force_exact_version", False)
|
||||
folder = check.get("update_folder", check["checkout_folder"])
|
||||
folder = check.get("update_folder", check.get("checkout_folder")) # either should be set, tested above
|
||||
pre_update_script = check.get("pre_update_script", None)
|
||||
post_update_script = check.get("post_update_script", None)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue