diff options
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 9dff9847a..65d0df639 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1337,6 +1337,8 @@ import_error: return dest[0]; } + #if MICROPY_ENABLE_EXTERNAL_IMPORT + // See if it's a package, then can try FS import if (!mp_obj_is_package(module)) { goto import_error; @@ -1363,6 +1365,13 @@ import_error: // TODO lookup __import__ and call that instead of going straight to builtin implementation return mp_builtin___import__(5, args); + + #else + + // Package import not supported with external imports disabled + goto import_error; + + #endif } void mp_import_all(mp_obj_t module) { |