mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
make parse_yaml_metadata ignore empty input
This commit is contained in:
parent
e83221eb03
commit
0d005ab83a
@ -1075,6 +1075,7 @@ def parse_json_metadata(mf, app):
|
|||||||
def parse_yaml_metadata(mf, app):
|
def parse_yaml_metadata(mf, app):
|
||||||
yamldata = yaml.load(mf, Loader=YamlLoader)
|
yamldata = yaml.load(mf, Loader=YamlLoader)
|
||||||
|
|
||||||
|
if yamldata:
|
||||||
for field in yamldata:
|
for field in yamldata:
|
||||||
if field not in yaml_app_fields:
|
if field not in yaml_app_fields:
|
||||||
warn_or_exception(_('Unrecognised app field: {fieldname}')
|
warn_or_exception(_('Unrecognised app field: {fieldname}')
|
||||||
@ -1092,8 +1093,6 @@ def parse_yaml_metadata(mf, app):
|
|||||||
if build_flag not in build_flags:
|
if build_flag not in build_flags:
|
||||||
warn_or_exception(_('Unrecognised build flag: {build_flag}')
|
warn_or_exception(_('Unrecognised build flag: {build_flag}')
|
||||||
.format(build_flag=build_flag))
|
.format(build_flag=build_flag))
|
||||||
|
|
||||||
if yamldata:
|
|
||||||
app.update(yamldata)
|
app.update(yamldata)
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user