diff options
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c index 74c55ea6c..c84a28e4c 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -92,6 +92,7 @@ void rt_init(void) { // built-in exceptions (TODO, make these proper classes, and const if possible) mp_map_add_qstr(&map_builtins, MP_QSTR_AttributeError, mp_obj_new_exception(MP_QSTR_AttributeError)); + mp_map_add_qstr(&map_builtins, MP_QSTR_ImportError, mp_obj_new_exception(MP_QSTR_ImportError)); mp_map_add_qstr(&map_builtins, MP_QSTR_IndexError, mp_obj_new_exception(MP_QSTR_IndexError)); mp_map_add_qstr(&map_builtins, MP_QSTR_KeyError, mp_obj_new_exception(MP_QSTR_KeyError)); mp_map_add_qstr(&map_builtins, MP_QSTR_NameError, mp_obj_new_exception(MP_QSTR_NameError)); @@ -167,7 +168,7 @@ void rt_init(void) { #if MICROPY_CPYTHON_COMPAT // Precreate sys module, so "import sys" didn't throw exceptions. - mp_obj_new_module(QSTR_FROM_STR_STATIC("sys")); + mp_obj_new_module(MP_QSTR_sys); #endif mp_module_micropython_init(); |