mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-09 08:50:28 +03:00
change VercodeOperation to TYPE_LIST
This commit is contained in:
parent
747fa13591
commit
618e2c7d72
11 changed files with 18 additions and 22 deletions
|
|
@ -456,13 +456,9 @@ def checkupdates_app(app):
|
|||
raise FDroidException(_('no version information found'))
|
||||
|
||||
if app.VercodeOperation:
|
||||
if isinstance(app.VercodeOperation, str):
|
||||
vercodes = [operate_vercode(app.VercodeOperation, vercode)]
|
||||
else:
|
||||
vercodes = sorted([
|
||||
operate_vercode(operation, vercode)
|
||||
for operation in app.VercodeOperation
|
||||
])
|
||||
vercodes = sorted([
|
||||
operate_vercode(operation, vercode) for operation in app.VercodeOperation
|
||||
])
|
||||
else:
|
||||
vercodes = [vercode]
|
||||
|
||||
|
|
|
|||
|
|
@ -264,13 +264,8 @@ def check_update_check_data_url(app): # noqa: D403
|
|||
def check_vercode_operation(app):
|
||||
if not app.VercodeOperation:
|
||||
return
|
||||
ops = (
|
||||
[app.VercodeOperation]
|
||||
if isinstance(app.VercodeOperation, str)
|
||||
else app.VercodeOperation
|
||||
)
|
||||
invalid_ops = []
|
||||
for op in ops:
|
||||
for op in app.VercodeOperation:
|
||||
if not common.VERCODE_OPERATION_RE.match(op):
|
||||
invalid_ops += op
|
||||
if invalid_ops:
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class App(dict):
|
|||
self.AutoUpdateMode = 'None'
|
||||
self.UpdateCheckMode = 'None'
|
||||
self.UpdateCheckIgnore = None
|
||||
self.VercodeOperation = None
|
||||
self.VercodeOperation = []
|
||||
self.UpdateCheckName = None
|
||||
self.UpdateCheckData = None
|
||||
self.CurrentVersion = ''
|
||||
|
|
@ -204,6 +204,7 @@ fieldtypes = {
|
|||
'AntiFeatures': TYPE_LIST,
|
||||
'AllowedAPKSigningKeys': TYPE_LIST,
|
||||
'Builds': TYPE_BUILD,
|
||||
'VercodeOperation': TYPE_LIST,
|
||||
'CurrentVersionCode': TYPE_INT,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue