mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
This commit is contained in:
parent
15439817bf
commit
b206a80dab
3 changed files with 25 additions and 2 deletions
|
@ -254,8 +254,9 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
|
|||
theLength));
|
||||
}
|
||||
if (message != NULL) {
|
||||
PyErr_SetObject(PyExc_ImportError, message);
|
||||
Py_DECREF(message);
|
||||
PyErr_SetFromImportErrorWithNameAndPath(message,
|
||||
PyUnicode_FromString(shortname),
|
||||
pathname);
|
||||
}
|
||||
return NULL;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue