aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTTornblom <thomas.tornblom@iar.com>2020-04-28 12:40:42 +0200
committerTTornblom <thomas.tornblom@iar.com>2020-06-10 08:36:30 +0200
commit441a070ecff631f3402a81f764fd487e9ec8fc25 (patch)
tree70f38b3ff53ee956c44a4e51c343a1d1157cbc78
parente6e9554598b5d690dfc219cdd3fb34cf3d179a9b (diff)
downloadtrusted-firmware-m-441a070ecff631f3402a81f764fd487e9ec8fc25.tar.gz
Tools: Use build system appropriate newlines
After running tools/tfm_parse_manifest_list.py on Windows, git lists all generated files as changed, even if it is just the newlines that has changed. git converts the newlines on checkout and commit, so the files should really have newlines that are appropriate for the build system. This change makes python generate the appropriate newlines so that only truly changed files will be listed by git. Signed-off-by: TTornblom <thomas.tornblom@iar.com> Change-Id: Iba0a0a7f162de432f2c5eba938539759e00dd376
-rw-r--r--tools/tfm_parse_manifest_list.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index cca2cac9f1..10306bf725 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -118,7 +118,7 @@ def process_manifest(manifest_list_file, append):
print ("Generating " + outfile_name)
- outfile = io.open(outfile_name, "w", newline='\n')
+ outfile = io.open(outfile_name, "w", newline=None)
outfile.write(template.render(context))
outfile.close()
@@ -161,7 +161,7 @@ def gen_files(context, gen_file_list, append):
template = ENV.get_template(templatefile_name)
- outfile = io.open(outfile_name, "w", newline='\n')
+ outfile = io.open(outfile_name, "w", newline=None)
outfile.write(template.render(context))
outfile.close()