mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-01-25 15:58:03 -05: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user