Revision 6e688a67
Added by Bastian Schmidt about 2 months ago
bin/salt_python_wrapper | ||
---|---|---|
#!/bin/sh
|
||
|
||
set -u
|
||
|
||
for py in 'python3' 'python'; do
|
||
exe=$(type -p ${py})
|
||
if [ -n "${exe}" ]; then
|
||
if ${exe} -c 'import salt.config'; then
|
||
${exe} "$@"
|
||
exit $?
|
||
fi
|
||
fi
|
||
done
|
||
|
||
echo "No usable python version found, check if python or python3 can import salt.config!" 1>&2
|
||
exit 1
|
sbin/upload-salt-reports | ||
---|---|---|
#!/usr/bin/salt_python_wrapper
|
||
#!/usr/bin/python3
|
||
# Uploads reports from the Salt job cache to Foreman
|
||
|
||
from __future__ import print_function
|
Also available in: Unified diff
Remove py2/3 distinction script
Since the last Salt version with py2 support (Salt 3000) is not
supported anymore, we don't need to distinguish between py2 and py3.