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:
Hans-Christoph Steiner 2016-11-07 21:21:32 +01:00
parent 3fb4cba178
commit 1f55a40caa
4 changed files with 5 additions and 0 deletions

View File

@ -904,6 +904,11 @@ def post_metadata_parse(app):
elif ftype == TYPE_STRING:
if isinstance(v, bool) and v:
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:
app.Description = 'No description available'

Binary file not shown.