From b752aff8edbb41eefe0e3f0b60da552c242a4439 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Mon, 17 Feb 2014 16:51:42 +0100 Subject: [PATCH] Don't crash if an apk got built without source (e.g. with --no-tarball) --- fdroidserver/publish.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.30.2