File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -685,24 +685,22 @@ pycore_init_import_warnings(PyThreadState *tstate, PyObject *sysmod)
685
685
return status ;
686
686
}
687
687
688
- const PyConfig * config = _PyInterpreterState_GetConfig (tstate -> interp );
689
- if (_Py_IsMainInterpreter (tstate )) {
690
- /* Initialize _warnings. */
691
- status = _PyWarnings_InitState (tstate );
692
- if (_PyStatus_EXCEPTION (status )) {
693
- return status ;
694
- }
688
+ /* Initialize _warnings. */
689
+ status = _PyWarnings_InitState (tstate );
690
+ if (_PyStatus_EXCEPTION (status )) {
691
+ return status ;
692
+ }
695
693
696
- if (config -> _install_importlib ) {
694
+ const PyConfig * config = _PyInterpreterState_GetConfig (tstate -> interp );
695
+ if (config -> _install_importlib ) {
696
+ if (_Py_IsMainInterpreter (tstate )) {
697
697
status = _PyConfig_WritePathConfig (config );
698
698
if (_PyStatus_EXCEPTION (status )) {
699
699
return status ;
700
700
}
701
701
}
702
- }
703
702
704
- /* This call sets up builtin and frozen import support */
705
- if (config -> _install_importlib ) {
703
+ /* This call sets up builtin and frozen import support */
706
704
status = init_importlib (tstate , sysmod );
707
705
if (_PyStatus_EXCEPTION (status )) {
708
706
return status ;
You can’t perform that action at this time.
0 commit comments