From 9aafabb62388286d11f53ae1aa1c9404e71a87b2 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 15 Feb 2021 09:28:08 +0900 Subject: [PATCH] Use python3 instead of python2 Backport note: The current bionic image used in CI does not include python 2 so we switch to python 3. Change-Id: If75c8d42891efa87ca1922e2189027b077e37fd9 (cherry picked from commit 7ea2e4f590d6c18ceb83d0507c9e9be72f0d5167) --- playbooks/run-lint-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/run-lint-tests.yaml b/playbooks/run-lint-tests.yaml index 6131ceb6e..385cc3dde 100644 --- a/playbooks/run-lint-tests.yaml +++ b/playbooks/run-lint-tests.yaml @@ -7,7 +7,7 @@ if [ -f Modulefile ]; then MODULE=$(awk '/^name/ {print $NF}' Modulefile |tr -d \"\') elif [ -f metadata.json ]; then - MODULE=$(python -c 'import json;print json.load(open("metadata.json"))["name"]') + MODULE=$(python3 -c 'import json;print(json.load(open("metadata.json"))["name"])') fi if [ -z "$MODULE" ]; then echo "Module name not defined in Modulefile or metadata.json"