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 committed 2016-11-16 23:28:03 +01:00
1 parent 3fb4cba178
commit 1f55a40caa
4 files changed
+5

No files matched your search

+5
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.
Binary file not shown.
Binary file not shown.