Skip to content

Commit 75dd71f

Browse files
author
joseramon.afonso
committed
Fixed problems with end line of some fileformats
1 parent 1ae12f9 commit 75dd71f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

devoutils/sorter/sorter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def __write_dst_file(data, dst_file, **kwargs):
104104
writer = FileWriter(dst_file, **kwargs)
105105
for line in data:
106106
if line:
107+
if not line.endswith("\n"):
108+
line = line + "\n"
107109
writer.write(line)
108110

109111
def __read_and_sort(self, src_type, src, kwargs):

0 commit comments

Comments
 (0)