mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-08-15 10:50:09 +02:00
UpdateCheckIgnore: Exception if version not matched
Ignoreversions were checked also if version did not match which raised the exception The 'version check' runs in some unexpected situations like just to find directories where to find the AutoName.
This commit is contained in:
parent
1ccd839a77
commit
7c4bed0558
@ -43,6 +43,9 @@ from .exception import VCSException, NoSubmodulesException, FDroidException, Met
|
||||
# required.
|
||||
def check_http(app):
|
||||
|
||||
ignoreversions = app.UpdateCheckIgnore
|
||||
ignoresearch = re.compile(ignoreversions).search if ignoreversions else None
|
||||
|
||||
try:
|
||||
|
||||
if not app.UpdateCheckData:
|
||||
@ -82,8 +85,9 @@ def check_http(app):
|
||||
raise FDroidException("No RE match for version")
|
||||
version = m.group(1)
|
||||
|
||||
return (version, vercode)
|
||||
|
||||
if version and ignoresearch and not ignoresearch(version):
|
||||
return (version, vercode)
|
||||
return (None, ("Version {version} is ignored").format(version=version))
|
||||
except FDroidException:
|
||||
msg = "Could not complete http check for app {0} due to unknown error: {1}".format(app.id, traceback.format_exc())
|
||||
return (None, msg)
|
||||
|
@ -1508,7 +1508,7 @@ def parse_androidmanifests(paths, app):
|
||||
|
||||
if vercode is not None \
|
||||
and (max_vercode is None or vercode > max_vercode):
|
||||
if not ignoresearch or not ignoresearch(version):
|
||||
if version and (not ignoresearch or not ignoresearch(version)):
|
||||
if version is not None:
|
||||
max_version = version
|
||||
if vercode is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user