Validate builtin member is a module

crypto-aes
Scott Shawcroft 3 years ago
parent 86fd93bd03
commit 6375d8699e
No known key found for this signature in database
GPG Key ID: 9349BC7E64B1921E
  1. 2
      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 {

Loading…
Cancel
Save