From b206a80dab519256a348e9800c4e52659d948359 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Mon, 16 Apr 2012 00:10:17 -0500 Subject: Fix #10854. Make use of the new path and name attributes on ImportError for extension modules on Windows. --- Python/dynload_win.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Python/dynload_win.c') diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 2cbfe9f30d..ef3e2c5958 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -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 { -- cgit v1.2.1