asyncio: re-raise CancelledError in wait_for_task()

This commit is contained in:
Aleix Conchillo Flaqué
2025-02-24 21:35:11 -08:00
parent 376d969a77
commit 699704732c

View File

@@ -80,6 +80,7 @@ class TaskManager:
logger.warning(f"{name}: timed out waiting for task to finish")
except asyncio.CancelledError:
logger.trace(f"{name}: unexpected task cancellation (maybe Ctrl-C?)")
raise
except Exception as e:
logger.exception(f"{name}: unexpected exception while stopping task: {e}")
finally: