Issue32490
Created on 2018-01-03 21:34 by jwilk, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 9163 | merged | ZackerySpytz, 2018-09-11 07:33 | |
| Messages (5) | |||
|---|---|---|---|
| msg309438 - (view) | Author: Jakub Wilk (jwilk) | Date: 2018-01-03 21:34 | |
Python 3.6.4 (default, Jan 3 2018, 21:10:22)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.call('nonexistent')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent': 'nonexistent'
Note that the name of the missing file is mentioned twice in the error message.
(Strictly speaking it's once in the message, and once in the filename attribute, but for a casual observer, the effect is the same.)
|
|||
| msg325012 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2018-09-11 14:45 | |
This code was added in issue4925. Is the original problem gone? |
|||
| msg325016 - (view) | Author: Benjamin Peterson (benjamin.peterson) * | Date: 2018-09-11 15:25 | |
The builtin exception is better now, so I don't see a problem with reverting the original patch. |
|||
| msg325019 - (view) | Author: Benjamin Peterson (benjamin.peterson) * | Date: 2018-09-11 15:54 | |
New changeset 73870bfeb9cf350d84ee88bd25430c104b3c6191 by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-32490: Fix filename duplication in subprocess exception message. (GH-9163) https://github.com/python/cpython/commit/73870bfeb9cf350d84ee88bd25430c104b3c6191 |
|||
| msg325488 - (view) | Author: Zackery Spytz (ZackerySpytz) * | Date: 2018-09-16 14:26 | |
There was also some relevant discussion in #22536. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:56 | admin | set | github: 76671 |
| 2018-09-16 14:26:50 | ZackerySpytz | set | messages: + msg325488 |
| 2018-09-11 15:54:10 | benjamin.peterson | set | status: open -> closed resolution: fixed messages: + msg325019 stage: patch review -> resolved |
| 2018-09-11 15:25:09 | benjamin.peterson | set | messages: + msg325016 |
| 2018-09-11 14:45:12 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka, benjamin.peterson messages: + msg325012 |
| 2018-09-11 07:37:04 | ZackerySpytz | set | nosy:
+ ZackerySpytz versions: + Python 3.6, Python 3.7, Python 3.8 |
| 2018-09-11 07:33:30 | ZackerySpytz | set | keywords:
+ patch stage: patch review pull_requests: + pull_request8606 |
| 2018-01-03 21:34:31 | jwilk | create | |