mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
add filename to ENOENT message #4925
This commit is contained in:
parent
c610e3e55e
commit
5f78040057
4 changed files with 7 additions and 0 deletions
|
|
@ -1255,6 +1255,8 @@ class Popen(object):
|
|||
errno = int(hex_errno, 16)
|
||||
if errno != 0:
|
||||
err_msg = os.strerror(errno)
|
||||
if errno == errno.ENOENT:
|
||||
err_msg += ': ' + repr(args[0])
|
||||
raise child_exception_type(errno, err_msg)
|
||||
raise child_exception_type(err_msg)
|
||||
|
||||
|
|
|
|||
|
|
@ -666,6 +666,7 @@ class POSIXProcessTestCase(BaseTestCase):
|
|||
# string and instead capture the exception that we want to see
|
||||
# below for comparison.
|
||||
desired_exception = e
|
||||
desired_exception.strerror += ': ' + repr(sys.executable)
|
||||
else:
|
||||
self.fail("chdir to nonexistant directory %s succeeded." %
|
||||
nonexistent_dir)
|
||||
|
|
|
|||
|
|
@ -726,6 +726,7 @@ Ilya Sandler
|
|||
Mark Sapiro
|
||||
Ty Sarna
|
||||
Ben Sayer
|
||||
Andrew Schaaf
|
||||
Michael Scharf
|
||||
Andreas Schawo
|
||||
Neil Schemenauer
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #4925: Add filename to error message when executable can't be found in
|
||||
subprocess.
|
||||
|
||||
- Issue #1574217: isinstance now catches only AttributeError, rather than
|
||||
masking all errors.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue