Mercurial > cpython-lru_cache-weakref
diff Python/dynload_win.c @ 76344:f341b99bb370
Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
| author | Brian Curtin <brian@python.org> |
|---|---|
| date | Mon, 16 Apr 2012 00:10:17 -0500 |
| parents | d48b4a1c511a |
| children | 7a32b9380ffd |
line wrap: on
line diff
--- a/Python/dynload_win.c Sun Apr 15 22:28:45 2012 -0400 +++ b/Python/dynload_win.c Mon Apr 16 00:10:17 2012 -0500 @@ -254,8 +254,9 @@ theLength)); } if (message != NULL) { - PyErr_SetObject(PyExc_ImportError, message); - Py_DECREF(message); + PyErr_SetFromImportErrorWithNameAndPath(message, + PyUnicode_FromString(shortname), + pathname); } return NULL; } else {
