mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) (GH-26755) (GH-27288)
(cherry picked from commit 50ffbe3daf
)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
This commit is contained in:
parent
0fb4b75f7a
commit
d0c6175303
1 changed files with 4 additions and 1 deletions
|
@ -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 be raised by the child only if the selected shell itself was not 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue