diff options
| author | Damien George | 2014-01-20 00:03:03 +0000 |
|---|---|---|
| committer | Damien George | 2014-01-20 00:03:03 +0000 |
| commit | 164774c1c1195a16757652730ccc1cac74353f42 (patch) | |
| tree | 659078ead41eaeec953206a8adff3551b7ff6ad4 /py | |
| parent | 7d0893545829f157a8a588d8a826d34ddf701cce (diff) | |
| parent | 159c0f75da698bf6d712ab334022f16f89e51593 (diff) | |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'py')
| -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 f5cea13f5..830bcc6aa 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -158,8 +158,8 @@ void rt_init(void) { mp_obj_t m_mp = mp_obj_new_module(qstr_from_str_static("micropython")); rt_store_name(qstr_from_str_static("micropython"), m_mp); - mp_obj_t m_sys = mp_obj_new_module(qstr_from_str_static("sys")); - rt_store_name(qstr_from_str_static("sys"), m_sys); + // Precreate sys module, so "import sys" didn't throw exceptions. + mp_obj_new_module(qstr_from_str_static("sys")); #endif next_unique_code_id = 1; // 0 indicates "no code" |
