Catch an extra error for Ring (#32477)

This commit is contained in:
springstan 2020-03-04 23:09:54 +01:00 committed by GitHub
parent 0c0d4c460f
commit c7d983fd44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,6 +205,11 @@ class GlobalDataUpdater:
"Time out fetching Ring %s data", self.data_type,
)
return
except requests.RequestException as err:
_LOGGER.warning(
"Error fetching Ring %s data: %s", self.data_type, err,
)
return
for update_callback in self.listeners:
update_callback()
@ -290,6 +295,14 @@ class DeviceDataUpdater:
device_id,
)
continue
except requests.RequestException as err:
_LOGGER.warning(
"Error fetching Ring %s data for device %s: %s",
self.data_type,
device_id,
err,
)
continue
for update_callback in info["update_callbacks"]:
self.hass.loop.call_soon_threadsafe(update_callback, data)