ensure that app.Categories is always a list of strings

This just makes it easier for people writing build recipes.  Rewriting will
output a list of strings as well.

The test index.xml and categories.txt are updated to include the new number
categories, and the changed CurrentVersionCode to 2147483647 (MAX_VALUE)
This commit is contained in:
Hans-Christoph Steiner 2016-12-06 16:11:25 +01:00
parent 7044a909ca
commit 713d9195c3
6 changed files with 36 additions and 28 deletions

View file

@ -813,6 +813,11 @@ def post_metadata_parse(app):
if type(v) in (float, int):
app[k] = str(v)
if isinstance(app.Categories, str):
app.Categories = [app.Categories]
else:
app.Categories = [str(i) for i in app.Categories]
builds = []
if 'builds' in app:
for build in app['builds']: