From 41924c86a6c484b78d46d9534bca9e4052224283 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 14 Feb 2022 10:30:55 -0500 Subject: [PATCH] Drop uneeded backframe traceback hide annotation --- tractor/_debug.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tractor/_debug.py b/tractor/_debug.py index 28d7bf0..c857b84 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -259,16 +259,11 @@ async def _hijack_stdin_for_child( orig_handler = signal.signal( signal.SIGINT, shield_sigint, - # partial(shield_sigint, pdb=pdb), ) -# try: -# yield try: with ( trio.CancelScope(shield=True), - # disable_sigint(), ): - try: lock = None async with _acquire_debug_lock(subactor_uid) as lock: @@ -584,10 +579,6 @@ def shield_sigint( ''' __tracebackhide__ = True - frame = sys._getframe() - last_f = frame.f_back - last_f.f_globals['__tracebackhide__'] = True - global _local_task_in_debug, _global_actor_in_debug in_debug = _global_actor_in_debug @@ -604,6 +595,7 @@ def shield_sigint( log.pdb( f"Ignoring SIGINT while child in debug mode: `{in_debug}`" ) + else: log.pdb( "Ignoring SIGINT while in debug mode"