]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts: Use python3 to test is_not_tar 1980/head
authorDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2022 14:19:10 +0000 (10:19 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 24 Mar 2022 20:36:05 +0000 (16:36 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
scripts/build_utils.sh

index 7d53a5927f6297619b72e5de12c150d15b0bfb42..365262bed2e281e71152d51f803c4e50a5a04cd6 100644 (file)
@@ -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 "exec '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