Fix #10854. Make use of the new path and name attributes on ImportError

for extension modules on Windows.
This commit is contained in:
Brian Curtin 2012-04-16 00:10:17 -05:00
parent 15439817bf
commit b206a80dab
3 changed files with 25 additions and 2 deletions

View file

@ -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 {