Martin Panter added the comment:

I think I have fixed the original problem via Issue 14285 (fully in 3.5+, 
partly in 2.7). It involved a bit more than checking ImportError.name, because 
runpy catches other exceptions like AttributeError, which do not identify a 
module name.

That leaves Laura’s error with the bad *.pyc file. I propose bad-pyc.patch, 
which adds the sys.modules check to fix the error message, and adds a test 
case. I think this patch should be applicable to Python 2 as well.

----------
versions: +Python 2.7 -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19771>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to