Skip to content

Commit 445918c

Browse files
committed
raise timeout error
1 parent d993f93 commit 445918c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/service-library/src/servicelib/async_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ async def retried_cancel_task(
254254
:param task: task to be canceled
255255
:param timeout_delay: duration (in seconds) to wait before giving
256256
up the cancellation. If None it waits forever. Will be repeated _MAX_TASK_CANCELLATION_ATTEMPTS times.
257-
:raises TimeoutError: raised if cannot cancel the task. Errors during cancellations are suppressed (backwards compatibility).
257+
:raises TimeoutError: raised if cannot cancel the task.
258258
"""
259259

260260
task.cancel()
261261
async with asyncio.timeout(timeout):
262-
with contextlib.suppress(BaseException):
262+
with contextlib.suppress(asyncio.CancelledError):
263263
await task

0 commit comments

Comments
 (0)