diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 932ab28a..d821375a 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -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)