Skip to content

Commit f3b0544

Browse files
committed
Merge branch 'fix_str_call' of github.com:msiemens/micropython into msiemens-fix_str_call
2 parents 94f6830 + 2c2a124 commit f3b0544

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/runtime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,8 @@ mp_obj_t rt_call_function_n_kw(mp_obj_t fun_in, uint n_args, uint n_kw, const mp
739739

740740
if (MP_OBJ_IS_SMALL_INT(fun_in)) {
741741
nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "'int' object is not callable"));
742+
} else if(MP_OBJ_IS_STR(fun_in)) {
743+
nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "'str' object is not callable"));
742744
} else {
743745
mp_obj_base_t *fun = fun_in;
744746
if (fun->type->call != NULL) {

0 commit comments

Comments
 (0)