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 Geoffrey Royer
Recipients Geoffrey Royer, docs@python
Date 2015-08-18.14:36:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1439908591.24.0.224694175166.issue24888@psf.upfronthosting.co.za>
In-reply-to
Content
According to the documentation of the subprocess.check_call function: https://docs.python.org/3/library/subprocess.html#subprocess.check_call

It would be nice to notify the reader that this function can raise FileNotFoundException. It is raised in case when the binary one wants to call does not exist.

Example:

Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.check_call(["foo", "bar"])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.4/subprocess.py", line 552, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.4/subprocess.py", line 533, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.4/subprocess.py", line 848, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1446, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'foo'
History
Date User Action Args
2015-08-18 14:36:31Geoffrey Royersetrecipients: + Geoffrey Royer, docs@python
2015-08-18 14:36:31Geoffrey Royersetmessageid: <1439908591.24.0.224694175166.issue24888@psf.upfronthosting.co.za>
2015-08-18 14:36:31Geoffrey Royerlinkissue24888 messages
2015-08-18 14:36:30Geoffrey Royercreate