Handle errors when updating device attributes

Capture the correct exceptions when updating device version and
enclosure type. Switches from BackendDown to ConnectionError and
HTTPError.
pull/2306/head
Åke Forslund 2019-09-16 09:47:35 +02:00
parent accafeeca6
commit 5457c265f3
1 changed files with 2 additions and 1 deletions

View File

@ -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):