fix: Check if apk already exists in present_vers before trying to access it

This commit is contained in:
HereticWay 2024-04-27 15:21:33 +02:00
parent 8b70217909
commit 25fc3e4310

View file

@ -139,7 +139,7 @@ def get_apks(appstate):
print(f"Chosen required version of {apk} is {required_ver}.") print(f"Chosen required version of {apk} is {required_ver}.")
if appstate['present_vers'][apk] == required_ver: if apk in appstate['present_vers'] and appstate['present_vers'][apk] == required_ver:
print("It's already present on disk, so skipping download.") print("It's already present on disk, so skipping download.")
else: else:
apkpure_dl(apk, apkpure_appname, required_ver, apkpure_dl(apk, apkpure_appname, required_ver,