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

This commit is contained in:
Hans-Christoph Steiner committed 2018-02-23 22:43:03 +01:00
1 parent 5a6a51a29e
commit 0fa50ebcb2
1 file changed
+5 -1
+5 -1
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