chiark / gitweb /
metadata: rename parse_metadata() to parse_txt_metadata()
authorHans-Christoph Steiner <hans@eds.org>
Mon, 20 Jul 2015 23:55:15 +0000 (16:55 -0700)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 1 Sep 2015 09:39:50 +0000 (11:39 +0200)
This makes the code clear as support for other metadata formats is added.

fdroidserver/import.py
fdroidserver/metadata.py

index 27a93ca6837615fa1cd85a3e3829ca561510e7ad..5c47f78039da2b06e0a98246a8aca37115fe6725 100644 (file)
@@ -198,7 +198,7 @@ def main():
         sys.exit(1)
 
     # Construct the metadata...
-    app = metadata.parse_metadata(None)[1]
+    app = metadata.parse_txt_metadata(None)[1]
     app['Web Site'] = website
     app['Source Code'] = sourcecode
     if issuetracker:
index 2ec38b0a5e67cfe39ee84e0129073a90104f321d..587c4aabbdf72014cdf46766d7f9ff30d2e149be 100644 (file)
@@ -470,7 +470,7 @@ def read_srclibs():
 
 
 # Read all metadata. Returns a list of 'app' objects (which are dictionaries as
-# returned by the parse_metadata function.
+# returned by the parse_txt_metadata function.
 def read_metadata(xref=True):
 
     # Always read the srclibs before the apps, since they can use a srlib as
@@ -484,7 +484,7 @@ def read_metadata(xref=True):
             os.makedirs(basedir)
 
     for metafile in sorted(glob.glob(os.path.join('metadata', '*.txt'))):
-        appid, appinfo = parse_metadata(metafile)
+        appid, appinfo = parse_txt_metadata(metafile)
         check_metadata(appinfo)
         apps[appid] = appinfo
 
@@ -584,7 +584,7 @@ def split_list_values(s):
 #  'descriptionlines' - original lines of description as formatted in the
 #                       metadata file.
 #
-def parse_metadata(metafile):
+def parse_txt_metadata(metafile):
 
     appid = None
     linedesc = None