File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,18 @@ public void postInitialize(PythonCore core) {
220
220
LanguageInfo llvmInfo = env .getInternalLanguages ().get (LLVM_LANGUAGE );
221
221
Toolchain toolchain = env .lookup (llvmInfo , Toolchain .class );
222
222
223
+ boolean isIsolated = PythonOptions .getOption (context , PythonOptions .IsolateFlag );
224
+ boolean capiSeparate = !capiHome .equals (coreHome );
225
+
223
226
Object [] path ;
224
227
int pathIdx = 0 ;
225
- boolean doIsolate = PythonOptions .getOption (context , PythonOptions .IsolateFlag );
226
- boolean capiSeparate = !capiHome .equals (coreHome );
227
- int defaultPathsLen = (doIsolate ? 3 : 4 ) + (capiSeparate ? 1 : 0 );
228
+ int defaultPathsLen = 2 ;
229
+ if (!isIsolated ) {
230
+ defaultPathsLen ++;
231
+ }
232
+ if (capiSeparate ) {
233
+ defaultPathsLen ++;
234
+ }
228
235
if (option .length () > 0 ) {
229
236
String [] split = option .split (context .getEnv ().getPathSeparator ());
230
237
path = new Object [split .length + defaultPathsLen ];
@@ -233,7 +240,7 @@ public void postInitialize(PythonCore core) {
233
240
} else {
234
241
path = new Object [defaultPathsLen ];
235
242
}
236
- if (!doIsolate ) {
243
+ if (!isIsolated ) {
237
244
path [pathIdx ++] = getScriptPath (env , args );
238
245
}
239
246
path [pathIdx ++] = stdlibHome ;
You can’t perform that action at this time.
0 commit comments