From 02a9cac55709226460f26077692632e8127bb58c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 14 Oct 2020 13:48:14 -0400 Subject: [PATCH] Drop remaining warn()s --- tractor/_forkserver_override.py | 4 ++-- tractor/_trionics.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tractor/_forkserver_override.py b/tractor/_forkserver_override.py index 07933dd..c515510 100644 --- a/tractor/_forkserver_override.py +++ b/tractor/_forkserver_override.py @@ -234,8 +234,8 @@ def main(listener_fd, alive_r, preload, main_path=None, sys_path=None): os.close(child_w) else: # This shouldn't happen really - warnings.warn('forkserver: waitpid returned ' - 'unexpected pid %d' % pid) + warnings.warning('forkserver: waitpid returned ' + 'unexpected pid %d' % pid) if listener in rfds: # Incoming fork request diff --git a/tractor/_trionics.py b/tractor/_trionics.py index aecf16e..203a9dc 100644 --- a/tractor/_trionics.py +++ b/tractor/_trionics.py @@ -275,7 +275,7 @@ async def open_nursery() -> typing.AsyncGenerator[ActorNursery, None]: # ria_nursery scope end # XXX: do we need a `trio.Cancelled` catch here as well? - except (Exception, trio.MultiError) as err: + except (Exception, trio.MultiError, trio.Cancelled) as err: # If actor-local error was raised while waiting on # ".run_in_actor()" actors then we also want to cancel all # remaining sub-actors (due to our lone strategy: