1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

only move GPG signature if APK exists

The .asc moving code just needed to be indented so it only runs when
'srcname' exists in apk[], otherwise it just throws a KeyError
This commit is contained in:
Hans-Christoph Steiner 2014-06-30 21:47:47 -04:00
parent a58a9bff18
commit d0c767ce5e

View File

@ -876,11 +876,11 @@ def archive_old_apks(apps, apks, archapks, repodir, archivedir, defaultkeepversi
if 'srcname' in apk:
shutil.move(os.path.join(repodir, apk['srcname']),
os.path.join(archivedir, apk['srcname']))
# Move GPG signature too...
sigfile = apk['srcname'] + '.asc'
sigsrc = os.path.join(repodir, sigfile)
if os.path.exists(sigsrc):
shutil.move(sigsrc, os.path.join(archivedir, sigfile))
# Move GPG signature too...
sigfile = apk['srcname'] + '.asc'
sigsrc = os.path.join(repodir, sigfile)
if os.path.exists(sigsrc):
shutil.move(sigsrc, os.path.join(archivedir, sigfile))
archapks.append(apk)
apks.remove(apk)