py: Factor out mp_obj_is_package() function.

This commit is contained in:
Paul Sokolovsky
2014-10-25 21:04:13 +03:00
parent 8becca7c82
commit e5a3759ff5
3 changed files with 9 additions and 2 deletions

View File

@@ -1098,8 +1098,7 @@ import_error:
}
// See if it's a package, then can try FS import
mp_load_method_maybe(module, MP_QSTR___path__, dest);
if (dest[0] == MP_OBJ_NULL) {
if (!mp_obj_is_package(module)) {
goto import_error;
}