summaryrefslogtreecommitdiff
path: root/extmod/modurandom.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/modurandom.c')
-rw-r--r--extmod/modurandom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modurandom.c b/extmod/modurandom.c
index e3c7fc7f5..34fe1b749 100644
--- a/extmod/modurandom.c
+++ b/extmod/modurandom.c
@@ -154,7 +154,7 @@ STATIC mp_obj_t mod_urandom_choice(mp_obj_t seq) {
if (len > 0) {
return mp_obj_subscr(seq, mp_obj_new_int(yasmarang_randbelow(len)), MP_OBJ_SENTINEL);
} else {
- nlr_raise(mp_obj_new_exception(&mp_type_IndexError));
+ mp_raise_type(&mp_type_IndexError);
}
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_urandom_choice_obj, mod_urandom_choice);