[issue1559549] ImportError needs attributes for module and file name
Filip Gruszczyński
report at bugs.python.org
Fri Mar 18 23:56:54 CET 2011
Filip Gruszczyński <gruszczy at gmail.com> added the comment:
Ok, here is a patch created using mq. I have a problem, however. I managed to solve following situation:
try:
raise ImportError('failed import' module_name='somemodule')
except ImportError as e:
print(e.module_name)
that would print somemodule.
However, I can't pass kwargs to ImportError_init from load_next. If someone could instruct me, how this can be achieved, I'll be happy to do that.
----------
Added file: http://bugs.python.org/file21284/1559549_3.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1559549>
_______________________________________
More information about the Python-bugs-list
mailing list