Skip to content

Commit 839bac4

Browse files
authored
Merge pull request #1867 from tannewt/hide_reload_traceback
Hide the traceback for the ReloadException.
2 parents bec84f2 + 6440af5 commit 839bac4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utils/pyexec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
131131
// at the moment, the value of SystemExit is unused
132132
ret = pyexec_system_exit;
133133
} else {
134-
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
134+
if ((mp_obj_t) nlr.ret_val != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) {
135+
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
136+
}
135137
ret = PYEXEC_EXCEPTION;
136138
}
137139
}

0 commit comments

Comments
 (0)