From abe2caf6df4cc98e540d9c05b4f2bce14cdedfa4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 7 Feb 2020 12:30:55 +1100 Subject: py/scheduler: Move clearing of kbd traceback to mp_keyboard_interrupt. This is a more logical place to clear the KeyboardInterrupt traceback, right before it is set as a pending exception. The clearing is also optimised from a function call to a simple store of NULL. --- lib/utils/interrupt_char.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib') diff --git a/lib/utils/interrupt_char.c b/lib/utils/interrupt_char.c index 3810f7a96..7014ae6a8 100644 --- a/lib/utils/interrupt_char.c +++ b/lib/utils/interrupt_char.c @@ -32,9 +32,6 @@ int mp_interrupt_char = -1; void mp_hal_set_interrupt_char(int c) { - if (c != -1) { - mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception))); - } mp_interrupt_char = c; } -- cgit v1.2.3