mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-38236: Dump path config at first import error (GH-16300)
Python now dumps path configuration if it fails to import the Python codecs of the filesystem and stdio encodings.
This commit is contained in:
parent
b4d0b39a9b
commit
fcdb027234
6 changed files with 123 additions and 15 deletions
|
@ -532,8 +532,7 @@ _Py_GetDLLPath(void)
|
|||
|
||||
|
||||
static PyStatus
|
||||
get_program_full_path(const PyConfig *config,
|
||||
PyCalculatePath *calculate, _PyPathConfig *pathconfig)
|
||||
get_program_full_path(_PyPathConfig *pathconfig)
|
||||
{
|
||||
const wchar_t *pyvenv_launcher;
|
||||
wchar_t program_full_path[MAXPATHLEN+1];
|
||||
|
@ -977,7 +976,7 @@ calculate_path_impl(const PyConfig *config,
|
|||
{
|
||||
PyStatus status;
|
||||
|
||||
status = get_program_full_path(config, calculate, pathconfig);
|
||||
status = get_program_full_path(pathconfig);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue