diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index a3f7d2ef..9fbfd1ca 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -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):