8000 bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) by jdevries3133 · Pull Request #26755 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) #26755

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

Merged
merged 5 commits into from
Jul 22, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

be raised by the child only if the selected shell itself cannot be found. To
determine if the shell failed to find the requested application, it is
necessary to check the return code or output from the subprocess.

A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid
arguments.
Expand Down
0