Skip to content

Commit 506e83e

Browse files
committed
Don't raise when mock_resampler's task is cancelled
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 1299db2 commit 506e83e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/timeseries/mock_resampler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def power_3_phase_senders(
197197
self._request_handler_task = task
198198

199199
def _handle_task_done(self, task: asyncio.Task[None]) -> None:
200+
if task.cancelled():
201+
return
200202
if exc := task.exception():
201203
raise SystemExit(f"Task {task.get_name()!r} failed: {exc}") from exc
202204

0 commit comments

Comments
 (0)