Skip to content

Commit 8abca6b

Browse files
jeplerdpgeorge
authored andcommitted
py/objexcept: Use mp_obj_get_type_str when printing exception name.
Saves a few bytes of code. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
1 parent 4fe08ff commit 8abca6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/objexcept.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kin
165165
mp_print_kind_t k = kind & ~PRINT_EXC_SUBCLASS;
166166
bool is_subclass = kind & PRINT_EXC_SUBCLASS;
167167
if (!is_subclass && (k == PRINT_REPR || k == PRINT_EXC)) {
168-
mp_print_str(print, qstr_str(o->base.type->name));
168+
mp_print_str(print, mp_obj_get_type_str(o_in));
169169
}
170170

171171
if (k == PRINT_EXC) {

0 commit comments

Comments
 (0)