diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-02-26 10:32:02 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-02-26 10:32:02 -0800 |
| commit | 6375d8699e84ffab0754af58c311bf869ad648ab (patch) | |
| tree | 1b859dd0f334b515baab2793dc488cc9cfc56c12 /py | |
| parent | 86fd93bd03d937713d4d23fa38ab359034c503c2 (diff) | |
Validate builtin member is a module
Diffstat (limited to 'py')
| -rw-r--r-- | py/builtinimport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 9edda18b3..2be779c6c 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -421,7 +421,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) { MP_MAP_LOOKUP); } - if (el != NULL) { + if (el != NULL && MP_OBJ_IS_TYPE(el->value, &mp_type_module)) { module_obj = el->value; mp_module_call_init(mod_name, module_obj); } else { |
