diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-31 23:47:52 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-31 23:47:52 +0000 |
commit | f3b05449cc59809c7c8a80f56721e2952aa25ac6 (patch) | |
tree | ee6de48eefdc9e835d6d6823bc15bfb6aba57681 /py | |
parent | 94f68300f92164d01c2c7285f8a17eb0c5577613 (diff) | |
parent | 2c2a124e166b9263d027a77fe25d69c11e8003a4 (diff) | |
download | micropython-f3b05449cc59809c7c8a80f56721e2952aa25ac6.tar.gz micropython-f3b05449cc59809c7c8a80f56721e2952aa25ac6.zip |
Merge branch 'fix_str_call' of github.com:msiemens/micropython into msiemens-fix_str_call
Diffstat (limited to 'py')
-rw-r--r-- | py/runtime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index ea96ca9f7a..bd0051462d 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -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 if (MP_OBJ_IS_SMALL_INT(fun_in)) { nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "'int' object is not callable")); + } else if(MP_OBJ_IS_STR(fun_in)) { + nlr_jump(mp_obj_new_exception_msg(MP_QSTR_TypeError, "'str' object is not callable")); } else { mp_obj_base_t *fun = fun_in; if (fun->type->call != NULL) { |