Message237849
The patches at Issue 19771 should remove the part of the message that incorrectly says “. . . is a package and cannot be directly executed”. However that still leaves the problem of the suppressed traceback.
I am posting runpy-traceback.patch here which adds some tests to check if the traceback is suppressed. The offending test is marked @expectedFailure. It also points out where the exception is being incorrectly caught, but I haven’t thought of a nice way to fix the problem.
Other changes in the runpy-traceback.patch:
* Removed the exception message rewriting in _run_module_as_main(), because it seems to be redundant with the _get_main_module_details() function
* Fixed test_cmd_line_script.CmdLineTest.test_dash_m_error_code_is_one(), which was only checking the Python exit status, and not verifying that the specific failure was the one anticipated |
|
Date |
User |
Action |
Args |
2015-03-11 08:30:58 | martin.panter | set | recipients:
+ martin.panter, ncoghlan, eric.araujo, BreamoreBoy, schlamar, eric.snow, robagar |
2015-03-11 08:30:58 | martin.panter | set | messageid: <1426062658.25.0.831652576182.issue14285@psf.upfronthosting.co.za> |
2015-03-11 08:30:58 | martin.panter | link | issue14285 messages |
2015-03-11 08:30:58 | martin.panter | create | |
|