summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-31 23:47:52 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-31 23:47:52 +0000
commitf3b05449cc59809c7c8a80f56721e2952aa25ac6 (patch)
treeee6de48eefdc9e835d6d6823bc15bfb6aba57681
parent94f68300f92164d01c2c7285f8a17eb0c5577613 (diff)
parent2c2a124e166b9263d027a77fe25d69c11e8003a4 (diff)
downloadmicropython-f3b05449cc59809c7c8a80f56721e2952aa25ac6.tar.gz
micropython-f3b05449cc59809c7c8a80f56721e2952aa25ac6.zip
Merge branch 'fix_str_call' of github.com:msiemens/micropython into msiemens-fix_str_call
-rw-r--r--py/runtime.c2
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) {