Skip to content

Commit

Permalink
fix: do not swallow asyncio.CancelledError (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jun 26, 2024
1 parent b70d071 commit 09bc38b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/uiprotect/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,6 @@ async def _get_versions_from_api(
except (
TimeoutError,
asyncio.TimeoutError,
asyncio.CancelledError,
aiohttp.ServerDisconnectedError,
client_exceptions.ClientError,
) as err:
Expand Down
2 changes: 1 addition & 1 deletion src/uiprotect/data/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ async def queue_update(self, callback: Callable[[], None]) -> None:
await self._update_sync.event.wait()
self._update_sync.event.clear()
return
except (TimeoutError, asyncio.TimeoutError, asyncio.CancelledError):
except (TimeoutError, asyncio.TimeoutError):
async with self._update_sync.lock:
# Important! Now that we have the lock, we yield to the event loop so any
# updates from the websocket are processed before we generate the diff
Expand Down
1 change: 0 additions & 1 deletion src/uiprotect/data/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ async def refresh_device(self, model_type: ModelType, device_id: str) -> None:
ValidationError,
TimeoutError,
asyncio.TimeoutError,
asyncio.CancelledError,
ClientError,
ServerDisconnectedError,
):
Expand Down

0 comments on commit 09bc38b

Please sign in to comment.