Don't implicitly import "sys" module.

This commit is contained in:
Paul Sokolovsky 2014-01-20 01:57:20 +02:00
parent fe2690da0a
commit 159c0f75da

View file

@ -158,8 +158,8 @@ void rt_init(void) {
mp_obj_t m_mp = mp_obj_new_module(qstr_from_str_static("micropython")); mp_obj_t m_mp = mp_obj_new_module(qstr_from_str_static("micropython"));
rt_store_name(qstr_from_str_static("micropython"), m_mp); rt_store_name(qstr_from_str_static("micropython"), m_mp);
mp_obj_t m_sys = mp_obj_new_module(qstr_from_str_static("sys")); // Precreate sys module, so "import sys" didn't throw exceptions.
rt_store_name(qstr_from_str_static("sys"), m_sys); mp_obj_new_module(qstr_from_str_static("sys"));
#endif #endif
next_unique_code_id = 1; // 0 indicates "no code" next_unique_code_id = 1; // 0 indicates "no code"