[issue10854] Output .pyd name in error message of ImportError when DLL load fails
Brian Curtin
report at bugs.python.org
Wed Jul 27 06:01:53 CEST 2011
Brian Curtin <brian at python.org> added the comment:
How about something like this?
ImportError moves from being a "simple" exception to a "complex" one, then adds a "name" and "path" attribute. In dynload_win.c where we try (and fail) to load C extensions, the name and path are set on the ImportError. The test simply creates a file following the C extension name format and checks that the attributes end up being correct upon ImportError.
Jazzing up the ImportErrors elsewhere in the code might be useful after this, but I'll handle that in another issue if this gains traction.
----------
keywords: +patch
Added file: http://bugs.python.org/file22768/issue10854.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10854>
_______________________________________
More information about the Python-bugs-list
mailing list