1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02: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:
Hans-Christoph Steiner 2015-07-22 11:10:52 -07:00
parent dabb7e42b7
commit cc29d39f0a

View File

@ -604,7 +604,7 @@ def post_metadata_parse(thisinfo):
# 'builds' - a list of dictionaries containing build information
# for each defined build
# '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
# file. Where field is None, the comment goes at the
# end of the file. Alternatively, 'build:version' is
@ -769,7 +769,7 @@ def parse_txt_metadata(metafile):
if not curcomments:
return
for comment in curcomments:
thisinfo['comments'].append((key, comment))
thisinfo['comments'].append([key, comment])
del curcomments[:]
thisinfo = get_default_app_info_list()