From 343136a9344d87232d95141c245003ad6abfd4c5 Mon Sep 17 00:00:00 2001 From: Philippe Groarke Date: Sat, 14 Oct 2017 17:06:34 -0400 Subject: [PATCH] check.py : Fix missing enlines when sorting. --- check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check.py b/check.py index 27bd99c..d36db50 100755 --- a/check.py +++ b/check.py @@ -171,7 +171,10 @@ def sort_by_name(filename): out_file.write("\n") out_file.write("# " + platform + "\n") for tuples in sorted(name_tuples, key=lambda tup: tup[0].lower()): - out_file.write(tuples[1]) + out = tuples[1] + if out[-1] != '\n': + out += '\n' + out_file.write(out) out_file.close() input_file.close() shutil.copyfile(input_file.name, ".bak." + input_file.name)