Merge pull request #3 from HereticWay/fix-check-if-apk-in-present-vers

Fix: Check if apk already exists in present_vers before trying to access it
This commit is contained in:
Sayantan Santra 2024-04-27 08:56:28 -05:00 committed by GitHub
commit c38881922d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,