1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-06 11:00:13 +02:00

rewritemeta: fix proper_format() so lint works with .yml files

This commit is contained in:
Hans-Christoph Steiner 2018-02-23 22:42:46 +01:00
parent 5a6a51a29e
commit 0fa50ebcb2

View File

@ -36,7 +36,11 @@ def proper_format(app):
# read in metadata.py
with open(app.metadatapath, 'r', encoding='utf8') as f:
cur_content = f.read()
metadata.write_txt(s, app)
_ignored, extension = common.get_extension(app.metadatapath)
if extension == 'yml':
metadata.write_yaml(s, app)
elif extension == 'txt':
metadata.write_txt(s, app)
content = s.getvalue()
s.close()
return content == cur_content