From: Daniel Martí Date: Mon, 17 Feb 2014 15:51:42 +0000 (+0100) Subject: Don't crash if an apk got built without source (e.g. with --no-tarball) X-Git-Tag: 0.2~264 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b752aff8edbb41eefe0e3f0b60da552c242a4439;p=fdroidserver.git Don't crash if an apk got built without source (e.g. with --no-tarball) --- diff --git a/fdroidserver/publish.py b/fdroidserver/publish.py index c6dadea5..1b72e603 100644 --- a/fdroidserver/publish.py +++ b/fdroidserver/publish.py @@ -152,8 +152,9 @@ def main(): # Move the source tarball into the output directory... tarfilename = apkfilename[:-4] + '_src.tar.gz' - shutil.move(os.path.join(unsigned_dir, tarfilename), - os.path.join(output_dir, tarfilename)) + tarfile = os.path.join(unsigned_dir, tarfilename) + if os.path.exists(tarfile): + shutil.move(tarfile, os.path.join(output_dir, tarfilename)) logging.info('Published ' + apkfilename)