mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
metadata: work with dicts generated by standard YAML parsers
Now that the mismatch between 'builds' and 'Builds' has been fixed, it is now possible to read metadata/*.yml files with a standard YAML parser like PyYAML, then output them using `metadata.write_metadata()`. Other API functions in fdroidserver should also work in this case. I did this as I was working on fdroiddata!7860
This commit is contained in:
parent
bf25b4ca03
commit
e93acf7964
1 changed files with 2 additions and 0 deletions
|
|
@ -940,6 +940,8 @@ def write_yaml(mf, app):
|
|||
def _builds_to_yaml(app):
|
||||
builds = ruamel.yaml.comments.CommentedSeq()
|
||||
for build in app.get('Builds', []):
|
||||
if not isinstance(build, Build):
|
||||
build = Build(build)
|
||||
b = ruamel.yaml.comments.CommentedMap()
|
||||
for field in build_flags:
|
||||
value = getattr(build, field)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue