Skip to content

Commit b301740

Browse files
authored
Replace python with python3 in incremental_load.sh.tpl (#2051)
1 parent 7f7bede commit b301740

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

container/incremental_load.sh.tpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ function find_diffbase() {
115115
NEW_DIFF_IDS+=("${diff_id}")
116116
done
117117

118-
TOTAL_DIFF_IDS=($(cat "${name}" | python -mjson.tool | \
118+
119+
PYTHON="python"
120+
if command -v python3 &>/dev/null; then
121+
PYTHON="python3"
122+
fi
123+
124+
TOTAL_DIFF_IDS=($(cat "${name}" | $PYTHON -mjson.tool | \
119125
grep -E '^ +"sha256:' | cut -d'"' -f 2 | cut -d':' -f 2))
120126

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

0 commit comments

Comments
 (0)