File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -466,8 +466,12 @@ protected ArgumentClinicProvider getArgumentClinic() {
466
466
@ Specialization
467
467
boolean run (String name ) {
468
468
// if PYTHONPATH is set, it is prepended to the sys.path on startup and thus might
469
- // override any frozen modules from the stdlib
470
- return getContext ().getOption (PythonOptions .PythonPath ).isEmpty () && findFrozen (name ).status == FROZEN_OKAY ;
469
+ // override the site module from the stdlib
470
+ if (!getContext ().getOption (PythonOptions .PythonPath ).isEmpty () && "site" .equals (name )) {
471
+ return false ;
472
+ } else {
473
+ return findFrozen (name ).status == FROZEN_OKAY ;
474
+ }
471
475
}
472
476
}
473
477
You can’t perform that action at this time.
0 commit comments