mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-16 20:20:29 +03:00
Rename write_metadata to specify txt
This commit is contained in:
parent
885a3a73f1
commit
082e275aa1
2 changed files with 4 additions and 4 deletions
|
|
@ -1038,11 +1038,11 @@ def parse_txt_metadata(apps, metadatapath):
|
||||||
return (appid, thisinfo)
|
return (appid, thisinfo)
|
||||||
|
|
||||||
|
|
||||||
# Write a metadata file.
|
# Write a metadata file in txt format.
|
||||||
#
|
#
|
||||||
# 'mf' - Writer interface (file, StringIO, ...)
|
# 'mf' - Writer interface (file, StringIO, ...)
|
||||||
# 'app' - The app data
|
# 'app' - The app data
|
||||||
def write_metadata(mf, app):
|
def write_txt_metadata(mf, app):
|
||||||
|
|
||||||
def writecomments(key):
|
def writecomments(key):
|
||||||
written = 0
|
written = 0
|
||||||
|
|
|
||||||
|
|
@ -61,14 +61,14 @@ def main():
|
||||||
# read in metadata.py
|
# read in metadata.py
|
||||||
with open(metadatapath, 'r') as f:
|
with open(metadatapath, 'r') as f:
|
||||||
cur_content = f.read()
|
cur_content = f.read()
|
||||||
metadata.write_metadata(s, app)
|
metadata.write_txt_metadata(s, app)
|
||||||
content = s.getvalue()
|
content = s.getvalue()
|
||||||
s.close()
|
s.close()
|
||||||
if content != cur_content:
|
if content != cur_content:
|
||||||
print(metadatapath)
|
print(metadatapath)
|
||||||
else:
|
else:
|
||||||
with open(metadatapath, 'w') as f:
|
with open(metadatapath, 'w') as f:
|
||||||
metadata.write_metadata(f, app)
|
metadata.write_txt_metadata(f, app)
|
||||||
|
|
||||||
logging.debug("Finished.")
|
logging.debug("Finished.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue