mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03: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:
parent
a58a9bff18
commit
d0c767ce5e
1 changed files with 5 additions and 5 deletions
|
|
@ -876,11 +876,11 @@ def archive_old_apks(apps, apks, archapks, repodir, archivedir, defaultkeepversi
|
||||||
if 'srcname' in apk:
|
if 'srcname' in apk:
|
||||||
shutil.move(os.path.join(repodir, apk['srcname']),
|
shutil.move(os.path.join(repodir, apk['srcname']),
|
||||||
os.path.join(archivedir, apk['srcname']))
|
os.path.join(archivedir, apk['srcname']))
|
||||||
# Move GPG signature too...
|
# Move GPG signature too...
|
||||||
sigfile = apk['srcname'] + '.asc'
|
sigfile = apk['srcname'] + '.asc'
|
||||||
sigsrc = os.path.join(repodir, sigfile)
|
sigsrc = os.path.join(repodir, sigfile)
|
||||||
if os.path.exists(sigsrc):
|
if os.path.exists(sigsrc):
|
||||||
shutil.move(sigsrc, os.path.join(archivedir, sigfile))
|
shutil.move(sigsrc, os.path.join(archivedir, sigfile))
|
||||||
|
|
||||||
archapks.append(apk)
|
archapks.append(apk)
|
||||||
apks.remove(apk)
|
apks.remove(apk)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue