diff Lib/subprocess.py @ 66307:c06ed25e69b8

add filename to ENOENT message #4925
author Benjamin Peterson <benjamin@python.org>
date Sat, 20 Nov 2010 18:07:52 +0000
parents 1a1e7254d965
children 43e50bb923a9
line wrap: on
line diff
--- a/Lib/subprocess.py	Sat Nov 20 17:50:34 2010 +0000
+++ b/Lib/subprocess.py	Sat Nov 20 18:07:52 2010 +0000
@@ -1255,6 +1255,8 @@
                     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)