py/objexcept: Use INT_FMT when printing errno value.
This commit is contained in:
parent
016f830536
commit
9c02707356
@ -118,7 +118,7 @@ STATIC void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_pr
|
|||||||
if (o->base.type == &mp_type_OSError && MP_OBJ_IS_SMALL_INT(o->args->items[0])) {
|
if (o->base.type == &mp_type_OSError && MP_OBJ_IS_SMALL_INT(o->args->items[0])) {
|
||||||
qstr qst = mp_errno_to_str(o->args->items[0]);
|
qstr qst = mp_errno_to_str(o->args->items[0]);
|
||||||
if (qst != MP_QSTR_NULL) {
|
if (qst != MP_QSTR_NULL) {
|
||||||
mp_printf(print, "[Errno %d] %q", MP_OBJ_SMALL_INT_VALUE(o->args->items[0]), qst);
|
mp_printf(print, "[Errno " INT_FMT "] %q", MP_OBJ_SMALL_INT_VALUE(o->args->items[0]), qst);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user