summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index 99f7f6109..cbc7fb931 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -1531,7 +1531,8 @@ mp_obj_t mp_import_from(mp_obj_t module, qstr name) {
#if MICROPY_ENABLE_EXTERNAL_IMPORT
// See if it's a package, then can try FS import
- if (!mp_obj_is_package(module)) {
+ mp_load_method_maybe(module, MP_QSTR___path__, dest);
+ if (dest[0] == MP_OBJ_NULL) {
goto import_error;
}