Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user