From 766ae764a9c770c5dbd7c19d4da077b9f0b7a7d0 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 9 Sep 2015 09:20:41 -0400 Subject: [PATCH] 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 --- ceph-build/build/setup_pbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-build/build/setup_pbuilder b/ceph-build/build/setup_pbuilder index a232c250e..138d7b712 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" -- 2.47.3