diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-12 01:01:17 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-12 01:01:17 +0100 |
commit | 19b992a862d0665bf9b543c32ee76763a9834f48 (patch) | |
tree | bd6ab77dff45410dff5e0368dea2e7198f122355 /py/runtime.c | |
parent | b96c7c03ca790f62e4f9409b019290946f622aa7 (diff) | |
parent | 42453dc98e95270d3802baf3d70d60c7ecabf162 (diff) |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c index 4793f054a..b83cdb13b 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1050,7 +1050,7 @@ mp_obj_t mp_import_from(mp_obj_t module, qstr name) { if (dest[1] != MP_OBJ_NULL) { // Hopefully we can't import bound method from an object import_error: - nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ImportError, "Cannot import name '%s'", qstr_str(name))); + nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ImportError, "cannot import name %s", qstr_str(name))); } if (dest[0] != MP_OBJ_NULL) { @@ -1078,7 +1078,7 @@ import_error: args[1] = mp_const_none; // TODO should be globals args[2] = mp_const_none; // TODO should be locals args[3] = mp_const_true; // Pass sentinel "non empty" value to force returning of leaf module - args[4] = 0; + args[4] = MP_OBJ_NEW_SMALL_INT(0); // TODO lookup __import__ and call that instead of going straight to builtin implementation return mp_builtin___import__(5, args); |