summaryrefslogtreecommitdiff
path: root/py/objlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objlist.c')
-rw-r--r--py/objlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/objlist.c b/py/objlist.c
index 0cbf68c2f..d4f9b0222 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -31,6 +31,8 @@
#include "py/runtime.h"
#include "py/stackctrl.h"
+#include "supervisor/shared/translate.h"
+
STATIC mp_obj_t mp_obj_new_list_iterator(mp_obj_t list, size_t cur, mp_obj_iter_buf_t *iter_buf);
STATIC mp_obj_list_t *list_new(size_t n);
STATIC mp_obj_t list_extend(mp_obj_t self_in, mp_obj_t arg_in);
@@ -268,7 +270,7 @@ STATIC mp_obj_t list_pop(size_t n_args, const mp_obj_t *args) {
mp_check_self(MP_OBJ_IS_TYPE(args[0], &mp_type_list));
mp_obj_list_t *self = MP_OBJ_TO_PTR(args[0]);
if (self->len == 0) {
- mp_raise_IndexError("pop from empty list");
+ mp_raise_IndexError(translate("pop from empty list"));
}
size_t index = mp_get_index(self->base.type, self->len, n_args == 1 ? MP_OBJ_NEW_SMALL_INT(-1) : args[1], false);
mp_obj_t ret = self->items[index];