From 5457c265f38b75e2bef4547edee040b5a5eb0a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Mon, 16 Sep 2019 09:47:35 +0200 Subject: [PATCH] Handle errors when updating device attributes Capture the correct exceptions when updating device version and enclosure type. Switches from BackendDown to ConnectionError and HTTPError. --- mycroft/skills/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mycroft/skills/__main__.py b/mycroft/skills/__main__.py index 177b59d05c..3592476bce 100644 --- a/mycroft/skills/__main__.py +++ b/mycroft/skills/__main__.py @@ -21,6 +21,7 @@ directory. The executable gets added to the bin directory when installed import time from threading import Event +from requests import HTTPError, ConnectionError import mycroft.lock from msm.exceptions import MsmException @@ -181,7 +182,7 @@ class DevicePrimer(object): try: api = DeviceApi() api.update_version() - except BackendDown: + except (HTTPError, ConnectionError): self._notify_backend_down() def _update_system(self):