diff options
| author | Brian Curtin <brian@python.org> | 2012-04-16 00:10:17 -0500 | 
|---|---|---|
| committer | Brian Curtin <brian@python.org> | 2012-04-16 00:10:17 -0500 | 
| commit | b206a80dab519256a348e9800c4e52659d948359 (patch) | |
| tree | 7e26ffa873c4937b70d713f9f7d76a6a0b0920c4 /Python/dynload_win.c | |
| parent | 15439817bf77a6e3e68f7101fbe9723468613aff (diff) | |
| download | cpython-git-b206a80dab519256a348e9800c4e52659d948359.tar.gz | |
Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.
Diffstat (limited to 'Python/dynload_win.c')
| -rw-r--r-- | Python/dynload_win.c | 5 | 
1 files changed, 3 insertions, 2 deletions
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 {  | 
