diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85e4d1787..04a74c18c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,8 +41,10 @@ repos: rev: v3.15.0 hooks: - id: pyupgrade - name: Rewrite Code to be Py3.9+ - args: [--py39-plus] + name: Rewrite Code to be Py3.6+ + args: [--py36-plus] + ## DGM name: Rewrite Code to be Py3.9+ + ## DGM args: [--py39-plus] - repo: https://github.com/asottile/reorder_python_imports rev: v3.12.0 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 59688d092..17646579b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -26,7 +26,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2024.12.09" +__ScriptVersion="2024.12.12" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -2468,6 +2468,12 @@ __check_services_systemd() { servicename=$1 echodebug "Checking if service ${servicename} is enabled" + ## DGM + if [ "${DISTRO_NAME_L}" = "amazon_linux_ami" ] && [ "${DISTRO_VERSION}" = "2" ]; then + echoinfo "DGM skipping the is-enabled test on AMZN2, since command 'systemctl is-enabled salt-minion' is generating error msg 'Failed to get D-Bus connection: No such file or directory' on AMZN2 container" + return 0 + fi + if [ "$(systemctl is-enabled "${servicename}")" = "enabled" ]; then echodebug "Service ${servicename} is enabled" return 0 diff --git a/tests/integration/test_installation.py b/tests/integration/test_installation.py index 2bc791aa9..993f24b0e 100644 --- a/tests/integration/test_installation.py +++ b/tests/integration/test_installation.py @@ -45,7 +45,9 @@ def run_salt_call(cmd): try: result = subprocess.run(cmdl, capture_output=True, text=True) except TypeError: - result = subprocess.run(cmdl, text=True) + result = subprocess.run( + cmdl, stdout=PIPE, stderr=PIPE, universal_newlines=True + ) print(f"DGM run_salt_call result '{result}'", flush=True) if 0 == result.returncode: json_data = json.loads(result.stdout)