From e204f858ac77f349001a21e2a09538e5a505a116 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 4 Feb 2022 12:33:47 -0500 Subject: [PATCH] Handle a context cancel? Might be a noop --- tractor/_debug.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tractor/_debug.py b/tractor/_debug.py index f70502e..6fa8e2b 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -40,7 +40,7 @@ from trio_typing import TaskStatus from .log import get_logger from ._discovery import get_root from ._state import is_root_process, debug_mode -from ._exceptions import is_multi_cancelled +from ._exceptions import is_multi_cancelled, ContextCancelled try: # wtf: only exported when installed in dev mode? @@ -273,6 +273,7 @@ async def _hijack_stdin_for_child( trio.BrokenResourceError, trio.Cancelled, # by local cancellation trio.ClosedResourceError, # by self._rx_chan + ContextCancelled, ) as err: # XXX: there may be a race with the portal teardown