From 6e688a67eb8799c2d59c971ef77934bf683792bd Mon Sep 17 00:00:00 2001 From: Bastian Schmidt <schmidt@atix.de> Date: Mon, 17 Jan 2022 10:45:54 +0100 Subject: [PATCH] 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. * Remove salt_python_wrapper script * Change shebang of upload-salt-reports to `/usr/bin/env python3` --- bin/salt_python_wrapper | 16 ---------------- sbin/upload-salt-reports | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100755 bin/salt_python_wrapper diff --git a/bin/salt_python_wrapper b/bin/salt_python_wrapper deleted file mode 100755 index 8c12256..0000000 --- a/bin/salt_python_wrapper +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 diff --git a/sbin/upload-salt-reports b/sbin/upload-salt-reports index 4d1467c..0ee7d55 100755 --- a/sbin/upload-salt-reports +++ b/sbin/upload-salt-reports @@ -1,4 +1,4 @@ -#!/usr/bin/salt_python_wrapper +#!/usr/bin/python3 # Uploads reports from the Salt job cache to Foreman from __future__ import print_function