From ecf5f855eb5da70ca8c69700de01a6305d3f675d Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 25 Mar 2022 09:38:28 -0400 Subject: [PATCH] Fix python3 string check Co-authored-by: Kefu Chai --- scripts/build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 7d53a592..70802b0f 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -564,7 +564,7 @@ setup_pbuilder() { # ensure that the tgz is valid, otherwise remove it so that it can be recreated # again pbuild_tar="$basedir/$DIST.tgz" - is_not_tar=`python -c "exec 'try: import tarfile;print int(not int(tarfile.is_tarfile(\"$pbuild_tar\")))\nexcept IOError: print 1'"` + is_not_tar=`python3 -c $'try: import tarfile;print(int(not int(tarfile.is_tarfile(\"$pbuild_tar\"))))\nexcept IOError: print(1)'` file_size_kb=`test -f $pbuild_tar && du -k "$pbuild_tar" | cut -f1 || echo 0` if [ "$is_not_tar" = "1" ]; then -- 2.39.5