mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
properly parse build metadata list types like gradle=
Something like `gradle: yes` in YAML will be parsed as a boolean, since 'yes' is officially defined as a boolean true in YAML. For metadata fields that need to be lists, this needs to be converted. Same goes for a single string like `gradle: customFlavor`.
This commit is contained in:
parent
3fb4cba178
commit
1f55a40caa
4 changed files with 5 additions and 0 deletions
|
|
@ -904,6 +904,11 @@ def post_metadata_parse(app):
|
||||||
elif ftype == TYPE_STRING:
|
elif ftype == TYPE_STRING:
|
||||||
if isinstance(v, bool) and v:
|
if isinstance(v, bool) and v:
|
||||||
build.__dict__[k] = 'yes'
|
build.__dict__[k] = 'yes'
|
||||||
|
elif ftype == TYPE_LIST:
|
||||||
|
if isinstance(v, bool) and v:
|
||||||
|
build.__dict__[k] = ['yes']
|
||||||
|
elif isinstance(v, str):
|
||||||
|
build.__dict__[k] = [v]
|
||||||
|
|
||||||
if not app.Description:
|
if not app.Description:
|
||||||
app.Description = 'No description available'
|
app.Description = 'No description available'
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue