Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions custom_components/winix/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,13 @@ async def prepare_devices_wrappers(
id_tok = id_token or self._auth_response.id_token
uuid = WinixAccount(token).get_uuid()

try:
device_stubs = await Helpers.get_device_stubs(self._client, token, uuid)
except Exception as err:
LOGGER.error("Failed to get device stubs: %s", err, exc_info=True)
raise
# Don't log the failure exceptions here, they are logged in the caller. Just raise them up.
device_stubs = await Helpers.get_device_stubs(self._client, token, uuid)

# boto3 call must run in an executor thread (synchronous I/O).
try:
identity_id = await self.hass.async_add_executor_job(
Helpers.get_identity_id_sync, id_tok
)
except Exception as err:
LOGGER.error("Failed to get identity_id: %s", err, exc_info=True)
raise
identity_id = await self.hass.async_add_executor_job(
Helpers.get_identity_id_sync, id_tok
)

if device_stubs:
for device_stub in device_stubs:
Expand Down
Loading