diff options
| author | microDev <70126934+microDev1@users.noreply.github.com> | 2020-11-26 11:33:45 +0530 |
|---|---|---|
| committer | microDev <70126934+microDev1@users.noreply.github.com> | 2020-11-26 11:33:45 +0530 |
| commit | e90cb3ad866d418803768f3a58154e0039478e56 (patch) | |
| tree | 4b1d086fb43e11e1928a3c6cc9bd731c1d50407c /py/modsys.c | |
| parent | 6af48bb24cc12a9547aef8d18d56acf8e0f5695d (diff) | |
| parent | e778fc1f876116fd8f07b95f9eb8439745988fba (diff) | |
Merge branch 'main' into fix-touch
Diffstat (limited to 'py/modsys.c')
| -rw-r--r-- | py/modsys.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/py/modsys.c b/py/modsys.c index a1d2cf831..81628683d 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -92,13 +92,11 @@ STATIC const MP_DEFINE_STR_OBJ(platform_obj, MICROPY_PY_SYS_PLATFORM); // exit([retval]): raise SystemExit, with optional argument given to the exception STATIC mp_obj_t mp_sys_exit(size_t n_args, const mp_obj_t *args) { - mp_obj_t exc; if (n_args == 0) { - exc = mp_obj_new_exception(&mp_type_SystemExit); + nlr_raise(mp_obj_new_exception(&mp_type_SystemExit)); } else { - exc = mp_obj_new_exception_arg1(&mp_type_SystemExit, args[0]); + mp_raise_arg1(&mp_type_SystemExit, args[0]); } - nlr_raise(exc); } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit); |
