summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstr.c
diff options
context:
space:
mode:
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 98657bd217..7d7f0e1dfa 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;
}