-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) #26755
Conversation
* When shell=True, subprocess will exec /bin/bash [args], for example. * If the program is not found, the shell will not exit with a failure code, and the problem may go unnoticed at first.
Doc/library/subprocess.rst
Outdated
@@ -689,7 +689,10 @@ execute, will be re-raised in the parent. | |||
|
|||
The most common exception raised is :exc:`OSError`. This occurs, for example, | |||
when trying to execute a non-existent file. Applications should prepare for | |||
:exc:`OSError` exceptions. | |||
:exc:`OSError` exceptions. Note that, when ``"shell=True"``, :exc:`OSError` will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please wrap the "will" so that the line does not exceed 80 chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have done that. In a separate additional commit I also went over the whole file line wrapping any other paragraphs that went over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the separate commit - it spams the diff and makes it hard to see what you changed.
In general we don't do sweeping fixes like that, but try not to add more formatting problems with the changes we commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it's been reverted.
This PR is stale because it has been open for 30 days with no activity. |
@iritkatriel is there anyone else who can take a second look at this if @giampaolo is unavailable? |
Thanks @jdevries3133 for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
GH-27288 is a backport of this pull request to the 3.10 branch. |
…n(..., shell=True) (pythonGH-26755) (cherry picked from commit 50ffbe3) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
GH-27289 is a backport of this pull request to the 3.9 branch. |
…n(..., shell=True) (pythonGH-26755) (cherry picked from commit 50ffbe3) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
code (rather than raise an exception), and the problem may go unnoticed at first.
I added the exact sentence @ncoghlan put at the end of the bpo thread.
https://bugs.python.org/issue14879