diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-08-09 20:00:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-09 20:00:18 -0400 |
| commit | bbc034cd3dfc46ee7938faedc915fec91610c6a3 (patch) | |
| tree | 4fe11d359088e41790030fce0763471b76ab3fb4 /py/objlist.c | |
| parent | b735b9dbed2132f07793324a40770f4bd96d9ae8 (diff) | |
| parent | 24e53ad5911f42efb6508b4a8dcf4a196a81494a (diff) | |
Merge pull request #1104 from tannewt/more_strings
Fixes and translate more strings.
Diffstat (limited to 'py/objlist.c')
| -rw-r--r-- | py/objlist.c | 4 |
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]; |
