aboutsummaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-07-14 22:56:52 +1000
committerDamien George <damien@micropython.org>2021-07-15 00:12:41 +1000
commit38a204ed9605a9233a66c86538562fab821ce63a (patch)
tree70786960922fad8c89ccf1e3e914ca88cf75a030 /py/objstr.c
parentbb00125aaac8376b8cc4c8f3da2423fcf6dae496 (diff)
py: Introduce and use mp_raise_type_arg helper.
To reduce code size. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 98657bd21..7d7f0e1df 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1081,7 +1081,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
field_name = lookup;
mp_map_elem_t *key_elem = mp_map_lookup(kwargs, field_q, MP_MAP_LOOKUP);
if (key_elem == NULL) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, field_q));
+ mp_raise_type_arg(&mp_type_KeyError, field_q);
}
arg = key_elem->value;
}