diff options
| author | Dan Halbert <halbert@adafruit.com> | 2019-05-08 19:40:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-08 19:40:55 -0400 |
| commit | 839bac47d43105e81e9f3f92bf022686ca0ede5c (patch) | |
| tree | 75bde5e5c0150b95b264920377791c5cd20abe4e | |
| parent | bec84f20abb716c0d8052554d841c1291ddf64cc (diff) | |
| parent | 6440af5c0670264170145d5b1cffa82fe5376159 (diff) | |
Merge pull request #1867 from tannewt/hide_reload_traceback
Hide the traceback for the ReloadException.
| -rwxr-xr-x | lib/utils/pyexec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index e8a1983b0..c8e369e79 100755 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -131,7 +131,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input // at the moment, the value of SystemExit is unused ret = pyexec_system_exit; } else { - mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val); + if ((mp_obj_t) nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val); + } ret = PYEXEC_EXCEPTION; } } |
