summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-11-16 14:37:00 -0800
committerGitHub <noreply@github.com>2020-11-16 14:37:00 -0800
commit516a85aafe4545bba478e3ce5ad1c9157a84a722 (patch)
tree2f58bb085fa98f5d588c8f2a6c49d7d95726d44c
parentf8eed1f74cbbf803af656bbb07da1720920b6ff5 (diff)
parent0cd951fb73198f5c3dd03ea0463382edac0d3d4d (diff)
Merge pull request #3702 from DavePutz/issue2056
Issue2056 - Prevent tracebacks from accumulating in REPL
-rw-r--r--py/obj.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index 9dc0cf474..315e816e0 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -125,6 +125,7 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) {
mp_printf(print, decompressed_block, block);
}
}
+ mp_obj_exception_clear_traceback(exc);
}
}
mp_obj_print_helper(print, exc, PRINT_EXC);