unix/main: Don't call mp_obj_is_package() without a need.
By swapping conditions, put "!subpkg_tried" first. Calling
mp_obj_is_package() may lead to side effects like excepttions if
module implements __getattr__().
@@ -685,7 +685,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
return handle_uncaught_exception(nlr.ret_val) & 0xff;
}
- if (mp_obj_is_package(mod) && !subpkg_tried) {
+ if (!subpkg_tried && mp_obj_is_package(mod)) {
subpkg_tried = true;
vstr_t vstr;
int len = strlen(argv[a + 1]);
