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 | 11c40722cbce41aff4d80d99d677ee2b5cabf0cd (patch) | |
| tree | 4bdbf8967ceb8d00cde5182b30a7630357f484d4 /Python/dynload_win.c | |
| parent | 35bb42ff9e162ffb3b2cf8da6d00ac8fb5be667e (diff) | |
| download | cpython-11c40722cbce41aff4d80d99d677ee2b5cabf0cd.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 { |
