mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
checkupdates: split out vercode parsing into testable function
This commit is contained in:
parent
bbee2cf707
commit
7d40e89341
3 changed files with 18 additions and 9 deletions
|
|
@ -168,15 +168,8 @@ def check_tags(app, pattern):
|
|||
if vercode:
|
||||
logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})"
|
||||
.format(subdir, version, vercode))
|
||||
try:
|
||||
i_vercode = int(vercode, 0)
|
||||
except ValueError:
|
||||
i_vercode = int(vercode)
|
||||
try:
|
||||
i_hcode = int(hcode, 0)
|
||||
except ValueError:
|
||||
i_hcode = int(hcode)
|
||||
if i_vercode > i_hcode:
|
||||
i_vercode = common.version_code_string_to_int(vercode)
|
||||
if i_vercode > common.version_code_string_to_int(hcode):
|
||||
hpak = package
|
||||
htag = tag
|
||||
hcode = str(i_vercode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue