userid-validation: move to python3
Change-Id: Ib7e8e179f6f3992f700a186e8077fed9e068254b
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/jenkins/userid-validation b/jenkins/userid-validation
index c9af893..c90f23c 100755
--- a/jenkins/userid-validation
+++ b/jenkins/userid-validation
@@ -21,7 +21,7 @@
echo "Checking ${GERRIT_PROJECT}:${GERRIT_BRANCH}:${GERRIT_CHANGE_ID}:${GERRIT_PATCHSET_REVISION}"
# shellcheck disable=2086 # GERRIT_COMMAND is purposefully wordsplit.
-COMMITTER_EMAIL=$(${GERRIT_COMMAND}/a/changes/${GERRIT_PROJECT/\//%2F}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/${GERRIT_PATCHSET_REVISION}/commit | python2 -c "import sys, json; sys.stdin.read(4); print(json.load(sys.stdin)['committer']['email'])")
+COMMITTER_EMAIL=$(${GERRIT_COMMAND}/a/changes/${GERRIT_PROJECT/\//%2F}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/${GERRIT_PATCHSET_REVISION}/commit | python3 -c "import sys, json; sys.stdin.read(4); print(json.load(sys.stdin)['committer']['email'])")
if [ "${COMMITTER_EMAIL}" = "" ]; then
echo "Unable to find committer."
"${GERRIT_SSH_CMD[@]}" review \
@@ -32,7 +32,7 @@
#echo "Commit by '${COMMITTER_EMAIL}'"
# shellcheck disable=2086 # GERRIT_COMMAND is purposefully wordsplit.
-COMMITTER_USERNAME=$(${GERRIT_COMMAND}/a/accounts/${COMMITTER_EMAIL} | python2 -c "import sys, json; sys.stdin.read(4); print(json.load(sys.stdin)['username'])")
+COMMITTER_USERNAME=$(${GERRIT_COMMAND}/a/accounts/${COMMITTER_EMAIL} | python3 -c "import sys, json; sys.stdin.read(4); print(json.load(sys.stdin)['username'])")
#COMMITTER_USERNAME=`${GERRIT_COMMAND}/a/accounts/${COMMITTER_EMAIL}`
echo "USERNAME: $COMMITTER_USERNAME"
if [ "${COMMITTER_USERNAME}" = "" ]; then