diff -r cf5b910ac4c8 Lib/subprocess.py --- a/Lib/subprocess.py Sat Nov 15 10:58:58 2014 -0800 +++ b/Lib/subprocess.py Sat Nov 15 16:41:04 2014 -0500 @@ -1453,7 +1453,7 @@ err_msg += ': ' + repr(cwd) else: err_msg += ': ' + repr(orig_executable) - raise child_exception_type(errno_num, err_msg) + raise child_exception_type(errno_num, err_msg, args[0]) raise child_exception_type(err_msg) diff -r cf5b910ac4c8 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Sat Nov 15 10:58:58 2014 -0800 +++ b/Lib/test/test_subprocess.py Sat Nov 15 16:41:04 2014 -0500 @@ -2521,6 +2521,11 @@ stderr=subprocess.PIPE) as proc: pass + def test_file_not_found_includes_filename(self): + with self.assertRaises(FileNotFoundError) as c: + subprocess.call(['nonexistent_binary', 'with', 'some', 'args']) + self.assertEqual(c.exception.filename, 'nonexistent_binary') + def test_main(): unit_tests = (ProcessTestCase,