Skip to content

Commit

Permalink
Let salt-ssh use 'platform-python' binary in RHEL8 (saltstack#191)
Browse files Browse the repository at this point in the history
RHEL/CentOS 8 has an internal Python interpreter called 'platform-python'
included in the base setup.

Add this binary to the list of Python executables to look for when
creating the sh shim.
  • Loading branch information
cbbayburt authored and meaksh committed Dec 4, 2019
1 parent 78b466b commit 43cdd24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/client/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
then SUDO="sudo "
fi
EX_PYTHON_INVALID={EX_THIN_PYTHON_INVALID}
PYTHON_CMDS="python3 python27 python2.7 python26 python2.6 python2 python"
PYTHON_CMDS="python3 /usr/libexec/platform-python python27 python2.7 python26 python2.6 python2 python"
for py_cmd in $PYTHON_CMDS
do
if command -v "$py_cmd" >/dev/null 2>&1 && "$py_cmd" -c "import sys; sys.exit(not (sys.version_info >= (2, 6)));"
Expand Down

0 comments on commit 43cdd24

Please sign in to comment.