Fixed a bug preventing OctoPrint from updating via github releases
Noticed while testing update path from 1.2.7 to 1.2.8 *bangs her head against a wall*
This commit is contained in:
parent
ee1f9029d1
commit
612005c4f6
1 changed files with 13 additions and 4 deletions
|
|
@ -503,19 +503,28 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin,
|
|||
"""
|
||||
|
||||
checks = self._get_configured_checks()
|
||||
populated_checks = dict()
|
||||
for target, check in checks.items():
|
||||
try:
|
||||
populated_checks[target] = self._populated_check(target, check)
|
||||
except exceptions.UnknownCheckType:
|
||||
self._logger.debug("Ignoring unknown check type for target {}".format(target))
|
||||
except:
|
||||
self._logger.exception("Error while populating check prior to update for target {}".format(target))
|
||||
|
||||
if check_targets is None:
|
||||
check_targets = checks.keys()
|
||||
to_be_updated = sorted(set(check_targets) & set(checks.keys()))
|
||||
check_targets = populated_checks.keys()
|
||||
to_be_updated = sorted(set(check_targets) & set(populated_checks.keys()))
|
||||
if "octoprint" in to_be_updated:
|
||||
to_be_updated.remove("octoprint")
|
||||
tmp = ["octoprint"] + to_be_updated
|
||||
to_be_updated = tmp
|
||||
|
||||
updater_thread = threading.Thread(target=self._update_worker, args=(checks, to_be_updated, force))
|
||||
updater_thread = threading.Thread(target=self._update_worker, args=(populated_checks, to_be_updated, force))
|
||||
updater_thread.daemon = False
|
||||
updater_thread.start()
|
||||
|
||||
return to_be_updated, dict((key, check["displayName"] if "displayName" in check else key) for key, check in checks.items() if key in to_be_updated)
|
||||
return to_be_updated, dict((key, check["displayName"] if "displayName" in check else key) for key, check in populated_checks.items() if key in to_be_updated)
|
||||
|
||||
def _update_worker(self, checks, check_targets, force):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue