@@ -594,7 +594,7 @@ _PyImport_ClearModulesByIndex(PyInterpreterState *interp)
594594 if (PyList_SetSlice (MODULES_BY_INDEX (interp ),
595595 0 , PyList_GET_SIZE (MODULES_BY_INDEX (interp )),
596596 NULL )) {
597- PyErr_FormatUnraisable ("Exception ignored on clearing interpreters module list" );
597+ PyErr_FormatUnraisable ("Exception ignored when clearing interpreters module list" );
598598 }
599599}
600600
@@ -4080,13 +4080,13 @@ _PyImport_FiniCore(PyInterpreterState *interp)
40804080 int verbose = _PyInterpreterState_GetConfig (interp )-> verbose ;
40814081
40824082 if (_PySys_ClearAttrString (interp , "meta_path" , verbose ) < 0 ) {
4083- PyErr_FormatUnraisable ("Exception ignored on clearing sys.meta_path" );
4083+ PyErr_FormatUnraisable ("Exception ignored when clearing sys.meta_path" );
40844084 }
40854085
40864086 // XXX Pull in most of finalize_modules() in pylifecycle.c.
40874087
40884088 if (_PySys_ClearAttrString (interp , "modules" , verbose ) < 0 ) {
4089- PyErr_FormatUnraisable ("Exception ignored on clearing sys.modules" );
4089+ PyErr_FormatUnraisable ("Exception ignored when clearing sys.modules" );
40904090 }
40914091
40924092 _PyImport_ClearCore (interp );
@@ -4161,10 +4161,10 @@ _PyImport_FiniExternal(PyInterpreterState *interp)
41614161 // XXX Uninstall importlib metapath importers here?
41624162
41634163 if (_PySys_ClearAttrString (interp , "path_importer_cache" , verbose ) < 0 ) {
4164- PyErr_FormatUnraisable ("Exception ignored on clearing sys.path_importer_cache" );
4164+ PyErr_FormatUnraisable ("Exception ignored when clearing sys.path_importer_cache" );
41654165 }
41664166 if (_PySys_ClearAttrString (interp , "path_hooks" , verbose ) < 0 ) {
4167- PyErr_FormatUnraisable ("Exception ignored on clearing sys.path_hooks" );
4167+ PyErr_FormatUnraisable ("Exception ignored when clearing sys.path_hooks" );
41684168 }
41694169}
41704170
0 commit comments