Berker Peksag <berker.pek...@gmail.com> added the comment:
FYI, in msg261315, Eryk has mentioned about possible improvement of the exception message on POSIX. The filename has been added to the exception message in 8621bb5d93239316f97281826461b85072ff6db7: >>> import subprocess, os >>> os.access('log.txt', os.X_OK) True >>> subprocess.call(['./log.txt']) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/berkerpeksag/projects/cpython/Lib/subprocess.py", line 325, in call with Popen(*popenargs, **kwargs) as p: File "/Users/berkerpeksag/projects/cpython/Lib/subprocess.py", line 830, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Users/berkerpeksag/projects/cpython/Lib/subprocess.py", line 1648, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: './log.txt' ---------- nosy: +berker.peksag stage: -> needs patch versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue26493> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com