mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +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
|
@ -3224,6 +3224,14 @@ def string_is_integer(string):
|
|||
return False
|
||||
|
||||
|
||||
def version_code_string_to_int(vercode):
|
||||
"""Convert an version code string of any base into an int"""
|
||||
try:
|
||||
return int(vercode, 0)
|
||||
except ValueError:
|
||||
return int(vercode)
|
||||
|
||||
|
||||
def local_rsync(options, fromdir, todir):
|
||||
'''Rsync method for local to local copying of things
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue