summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack DeVries <58614260+jdevries3133@users.noreply.github.com>2021-07-22 18:23:29 (GMT)
committerGitHub <noreply@github.com>2021-07-22 18:23:29 (GMT)
commit50ffbe3dafcae7826d114df61d56c7ac45a6358c (patch)
treefaac8b9e6595968f0bda0a0ba59ba989341e3dec
parentc05a790693b3b00ac7cb5b96ad416ca9d8ecb14a (diff)
downloadcpython-50ffbe3dafcae7826d114df61d56c7ac45a6358c.zip
cpython-50ffbe3dafcae7826d114df61d56c7ac45a6358c.tar.gz
cpython-50ffbe3dafcae7826d114df61d56c7ac45a6358c.tar.bz2
bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) (GH-26755)
-rw-r--r--Doc/library/subprocess.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 56b6b6e..6c127dc 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -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.