checkupdates: skip when there is no match for version

... name regex in CheckUpdateData
This commit is contained in:
linsui 2023-03-07 13:21:34 +08:00 committed by Jochen Sprickerhof
parent 99be8d679d
commit 88eac942ec

View file

@ -159,6 +159,8 @@ def check_tags(app, pattern):
if codeex: if codeex:
m = re.search(codeex, filecontent) m = re.search(codeex, filecontent)
if not m: if not m:
logging.debug(f"UpdateCheckData regex {codeex} for version code"
f" has no match in tag {tag}")
continue continue
vercode = m.group(1).strip() vercode = m.group(1).strip()
@ -176,7 +178,11 @@ def check_tags(app, pattern):
version = tag version = tag
if verex: if verex:
m = re.search(verex, filecontent) m = re.search(verex, filecontent)
if m: if not m:
logging.debug(f"UpdateCheckData regex {verex} for version name"
f" has no match in tag {tag}")
continue
version = m.group(1) version = m.group(1)
logging.debug("UpdateCheckData found version {0} ({1})" logging.debug("UpdateCheckData found version {0} ({1})"