From 7628ec62f639845e9a7f5b460b8c66aad1d1dca3 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Sat, 19 Aug 2023 15:28:18 +1200 Subject: [PATCH] Separate status and location check try/catches --- homeassistant/components/starlink/coordinator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/starlink/coordinator.py b/homeassistant/components/starlink/coordinator.py index 95a5515ab21..5df7b8132d2 100644 --- a/homeassistant/components/starlink/coordinator.py +++ b/homeassistant/components/starlink/coordinator.py @@ -56,13 +56,18 @@ class StarlinkUpdateCoordinator(DataUpdateCoordinator[StarlinkData]): status = await self.hass.async_add_executor_job( status_data, self.channel_context ) + except GrpcError as exc: + raise UpdateFailed from exc + + try: location = await self.hass.async_add_executor_job( location_data, self.channel_context ) - return StarlinkData(location, *status) except GrpcError as exc: raise UpdateFailed from exc + return StarlinkData(location, *status) + async def async_stow_starlink(self, stow: bool) -> None: """Set whether Starlink system tied to this coordinator should be stowed.""" async with asyncio.timeout(4):