jaystrict added the comment:

Narrowing it down further:

In $PATH there is a subdirectory of /home/user1.
PATH="/home/user1/bin:/usr/local/sbin:/usr/local/bin:/usr/bin"

Doing an strace on the example above shows the line
stat("/home/user1/bin/python", 0x7fff9d365bb0) = -1 EACCES (Permission denied)
AFAICT this line is generated when the shell looks for the correct python 
executable, but it should not interfere with the (later) call to 
subprocess.check_output().

If I delete "/home/user1/bin" from $PATH, then the correct FileNotFoundError is 
thrown.

So it seems (just guessing) that subprocess.check_output() somehow throws the 
older, obsolete error code. Would this be possible?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25481>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to