Message204334
Issue 19769 shows that if __main__ in a package throws ImportError, runpy will incorrectly report the package as not being directly executable (when it actually claims to be executable, it's just broken)
This can be fixed in 3.3+ by checking for an appropriate value in the name attribute of the caught exception, and only wrapping it if the failed lookup was for the __main__ submodule we're looking for.
The associated test can just use a __main__.py that deliberately raises ImportError. |
|
Date |
User |
Action |
Args |
2013-11-25 12:39:47 | ncoghlan | set | recipients:
+ ncoghlan |
2013-11-25 12:39:47 | ncoghlan | set | messageid: <1385383187.11.0.803942496087.issue19771@psf.upfronthosting.co.za> |
2013-11-25 12:39:47 | ncoghlan | link | issue19771 messages |
2013-11-25 12:39:46 | ncoghlan | create | |
|