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 ncoghlan
Recipients ncoghlan, vstinner
Date 2012-03-30.01:49:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333072178.4.0.24845260586.issue14439@psf.upfronthosting.co.za>
In-reply-to
Content
Taking a closer look at the four affected cases, I've changed my mind - the patch looks reasonable, go ahead and add it (as the new output actually still makes sense in the RunMainFromImporter case)

However, additional test cases should be added to test_cmd_line_script, at least for the two that are fairly easy to test:

- runpy import failure: shadow the stdlib by creating a runpy.py that raises RuntimeError at the top level
- runpy attribute lookup failure: shadow the stdlib with an empty runpy.py

I have no idea how you could force the latter two errors, though, so I'm fine with leaving those paths untested (while tests would be great if you can figure out some way to make the decoding and argument construction steps fail, I expect the use of the surrogateescape error handler will make that very hard to do).
History
Date User Action Args
2012-03-30 01:49:38ncoghlansetrecipients: + ncoghlan, vstinner
2012-03-30 01:49:38ncoghlansetmessageid: <1333072178.4.0.24845260586.issue14439@psf.upfronthosting.co.za>
2012-03-30 01:49:37ncoghlanlinkissue14439 messages
2012-03-30 01:49:37ncoghlancreate