mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-05 08:51:06 +03:00
metadata: store comments in lists since lists are used everywhere else
The only data produced by parsing metadata that was stored as a tuple was the comments' key/values. Everywhere else, lists are used. This changes the comments to also only use lists to keep the data consistent internally. That makes it vastly easier to produce the exact same metadata dict when parsing .txt, JSON, XML, etc.
This commit is contained in:
parent
dabb7e42b7
commit
cc29d39f0a
1 changed files with 2 additions and 2 deletions
|
@ -604,7 +604,7 @@ def post_metadata_parse(thisinfo):
|
||||||
# 'builds' - a list of dictionaries containing build information
|
# 'builds' - a list of dictionaries containing build information
|
||||||
# for each defined build
|
# for each defined build
|
||||||
# 'comments' - a list of comments from the metadata file. Each is
|
# 'comments' - a list of comments from the metadata file. Each is
|
||||||
# a tuple of the form (field, comment) where field is
|
# a list of the form [field, comment] where field is
|
||||||
# the name of the field it preceded in the metadata
|
# the name of the field it preceded in the metadata
|
||||||
# file. Where field is None, the comment goes at the
|
# file. Where field is None, the comment goes at the
|
||||||
# end of the file. Alternatively, 'build:version' is
|
# end of the file. Alternatively, 'build:version' is
|
||||||
|
@ -769,7 +769,7 @@ def parse_txt_metadata(metafile):
|
||||||
if not curcomments:
|
if not curcomments:
|
||||||
return
|
return
|
||||||
for comment in curcomments:
|
for comment in curcomments:
|
||||||
thisinfo['comments'].append((key, comment))
|
thisinfo['comments'].append([key, comment])
|
||||||
del curcomments[:]
|
del curcomments[:]
|
||||||
|
|
||||||
thisinfo = get_default_app_info_list()
|
thisinfo = get_default_app_info_list()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue