1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

A bit more None magic to fix some UCMs

This commit is contained in:
Daniel Martí 2014-06-22 17:36:00 +02:00
parent 25268a728d
commit 2686fa6faa

View File

@ -893,15 +893,21 @@ def parse_androidmanifests(paths, ignoreversions=None):
if matches: if matches:
vercode = matches.group(1) vercode = matches.group(1)
# Better some package name than nothing # Always grab the package name and version name in case they are not
if max_package is None: # together with the highest version code
if max_package is None and package is not None:
max_package = package max_package = package
if max_version is None and version is not None:
max_version = version
if max_vercode is None or (vercode is not None and vercode > max_vercode): if max_vercode is None or (vercode is not None and vercode > max_vercode):
if not ignoresearch or not ignoresearch(version): if not ignoresearch or not ignoresearch(version):
max_version = version if version is not None:
max_vercode = vercode max_version = version
max_package = package if vercode is not None:
max_vercode = vercode
if package is not None:
max_package = package
else: else:
max_version = "Ignore" max_version = "Ignore"