mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
fix building with yml metadata
This commit is contained in:
parent
54963506a0
commit
75ebb6e8cc
3 changed files with 42 additions and 10 deletions
|
|
@ -812,6 +812,12 @@ def post_metadata_parse(app):
|
|||
if type(v) in (float, int):
|
||||
app[k] = str(v)
|
||||
|
||||
if 'Builds' in app:
|
||||
app['builds'] = app.pop('Builds')
|
||||
|
||||
if 'flavours' in app and app['flavours'] == [True]:
|
||||
app['flavours'] = ['yes']
|
||||
|
||||
if isinstance(app.Categories, str):
|
||||
app.Categories = [app.Categories]
|
||||
elif app.Categories is None:
|
||||
|
|
@ -833,7 +839,8 @@ def post_metadata_parse(app):
|
|||
build[k] = ['yes']
|
||||
else:
|
||||
build[k] = []
|
||||
elif flagtype(k) == TYPE_STRING and type(v) in (float, int):
|
||||
elif (flagtype(k) == TYPE_STRING or flagtype(k) == TYPE_INT) \
|
||||
and type(v) in (float, int):
|
||||
build[k] = str(v)
|
||||
builds.append(build)
|
||||
|
||||
|
|
@ -950,9 +957,8 @@ def parse_json_metadata(mf, app):
|
|||
|
||||
|
||||
def parse_yaml_metadata(mf, app):
|
||||
|
||||
yamlinfo = yaml.load(mf, Loader=YamlLoader)
|
||||
app.update(yamlinfo)
|
||||
yamldata = yaml.load(mf, Loader=YamlLoader)
|
||||
app.update(yamldata)
|
||||
return app
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue