Skip to content

Commit

Permalink
Replace python with python3 in incremental_load.sh.tpl (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgosselin authored Apr 15, 2022
1 parent 7f7bede commit b301740
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion container/incremental_load.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@ function find_diffbase() {
NEW_DIFF_IDS+=("${diff_id}")
done

TOTAL_DIFF_IDS=($(cat "${name}" | python -mjson.tool | \

PYTHON="python"
if command -v python3 &>/dev/null; then
PYTHON="python3"
fi

TOTAL_DIFF_IDS=($(cat "${name}" | $PYTHON -mjson.tool | \
grep -E '^ +"sha256:' | cut -d'"' -f 2 | cut -d':' -f 2))

LEGACY_COUNT=$((${#TOTAL_DIFF_IDS[@]} - ${#NEW_DIFF_IDS[@]}))
Expand Down

0 comments on commit b301740

Please sign in to comment.