From 8596ae5c4a1551a0860d07e01e4e8af511b58f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 7 Nov 2018 11:10:31 +0100 Subject: [PATCH] SWU: Make sure check providers are in the correct format Just in case there's some odd data in `config.yaml` as reported in https://github.com/foosel/OctoPrint/issues/2871#issuecomment-436507623 --- src/octoprint/plugins/softwareupdate/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index fd17d0897..e5cc6f7ba 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -117,6 +117,9 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, update_check_hooks = self._plugin_manager.get_hooks("octoprint.plugin.softwareupdate.check_config") check_providers = self._settings.get(["check_providers"], merged=True) + if not isinstance(check_providers, dict): + check_providers = dict() + effective_configs = dict() for name, hook in update_check_hooks.items():