1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

Ignore non version number entries in build_tools_path

LooseVersion('debian') stay a string and results in a type error.
This commit is contained in:
Jochen Sprickerhof 2020-11-29 19:04:35 +01:00
parent 4d78d79280
commit 25b1f3fe8c

View File

@ -482,8 +482,11 @@ def find_apksigner():
for f in sorted(os.listdir(build_tools_path), reverse=True):
if not os.path.isdir(os.path.join(build_tools_path, f)):
continue
if LooseVersion(f) < LooseVersion(MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION):
return None
try:
if LooseVersion(f) < LooseVersion(MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION):
return None
except TypeError:
continue
if os.path.exists(os.path.join(build_tools_path, f, 'apksigner')):
apksigner = os.path.join(build_tools_path, f, 'apksigner')
logging.info("Using %s " % apksigner)