fix: NoneType error

This commit is contained in:
Sayantan Santra 2023-10-17 23:51:20 -05:00
parent 8e126d4d45
commit 3858faf970
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -125,12 +125,13 @@ def get_apks(appstate):
hard_version = False hard_version = False
compatible_vers = [] compatible_vers = []
for patch in patches: for patch in patches:
for pkg in patch['compatiblePackages']: if patch['compatiblePackages'] is not None:
if pkg['name'] == apk: for pkg in patch['compatiblePackages']:
try: if pkg['name'] == apk:
compatible_vers.append(pkg['versions'][-1]) try:
except TypeError: compatible_vers.append(pkg['versions'][-1])
pass except TypeError:
pass
if not compatible_vers: if not compatible_vers:
required_ver = Version('0') required_ver = Version('0')