From e243983ff87086d294b111bf552907b704022554 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Wed, 15 Feb 2023 16:12:12 +0100 Subject: [PATCH] Cleanup upon failing sign_apk (Closes: #1085) --- fdroidserver/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 65b19db4..3d5224ff 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -3349,6 +3349,8 @@ def sign_apk(unsigned_path, signed_path, keyalias): 'FDROID_KEY_STORE_PASS': config['keystorepass'], 'FDROID_KEY_PASS': config.get('keypass', "")}) if p.returncode != 0: + if os.path.exists(signed_path): + os.remove(signed_path) raise BuildException(_("Failed to sign application"), p.output) os.remove(unsigned_path)