From: Alfredo Deza Date: Wed, 9 Sep 2015 13:20:41 +0000 (-0400) Subject: fix invalid boolean return value for is_tarfile X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=766ae764a9c770c5dbd7c19d4da077b9f0b7a7d0;p=ceph-build.git fix invalid boolean return value for is_tarfile Because `not 1` in Python will return False, not 0. By cohercing to int again, we do get the 1 or 0 value the script is looking for Signed-off-by: Alfredo Deza --- diff --git a/ceph-build/build/setup_pbuilder b/ceph-build/build/setup_pbuilder index a232c250..138d7b71 100755 --- a/ceph-build/build/setup_pbuilder +++ b/ceph-build/build/setup_pbuilder @@ -41,7 +41,7 @@ fi # 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 not int(tarfile.is_tarfile(\"$pbuild_tar\"))\nexcept IOError: print 1'"` +is_not_tar=`python -c "exec 'try: import tarfile;print int(not int(tarfile.is_tarfile(\"$pbuild_tar\")))\nexcept IOError: print 1'"` if $is_not_tar; then rm -f "$pbuild_tar/$DIST.tgz"