summaryrefslogtreecommitdiff
path: root/shared/runtime/pyexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/runtime/pyexec.c')
-rw-r--r--shared/runtime/pyexec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c
index d2a1403e3..428cc95b2 100644
--- a/shared/runtime/pyexec.c
+++ b/shared/runtime/pyexec.c
@@ -165,6 +165,7 @@ static int parse_compile_execute(const void *source, mp_parse_input_kind_t input
#endif
if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(((mp_obj_base_t *)nlr.ret_val)->type), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) { // system exit
#if MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING
+ // None is an exit value of 0; an int is its value; anything else is 1
mp_obj_t val = mp_obj_exception_get_value(MP_OBJ_FROM_PTR(nlr.ret_val));
if (val != mp_const_none) {
if (mp_obj_is_int(val)) {