This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients BreamoreBoy, eric.araujo, eric.snow, martin.panter, ncoghlan, robagar, schlamar
Date 2015-03-11.08:30:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:58martin.pantersetrecipients: + martin.panter, ncoghlan, eric.araujo, BreamoreBoy, schlamar, eric.snow, robagar
2015-03-11 08:30:58martin.pantersetmessageid: <>
2015-03-11 08:30:58martin.panterlinkissue14285 messages
2015-03-11 08:30:58martin.pantercreate