From c17e6ecade35cdeb3b52c20a16900c3de875f8b5 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 3 Apr 2021 12:57:17 +0100 Subject: [PATCH] collate.py: Also newline='\n' on other open-for-write --- collate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collate.py b/collate.py index 7255dc1f..b7192b4e 100755 --- a/collate.py +++ b/collate.py @@ -133,7 +133,7 @@ def addmodules(data): if isfile(outfile): __make_backup(outfile) - with open(outfile, 'w') as csvfile: + with open(outfile, 'w', newline='\n') as csvfile: writer = csv.DictWriter(csvfile, fields, extrasaction='ignore') writer.writeheader() @@ -186,7 +186,7 @@ def addships(data): if isfile(shipfile): __make_backup(shipfile) - with open(shipfile, 'w') as csvfile: + with open(shipfile, 'w', newline='\n') as csvfile: writer = csv.DictWriter(csvfile, ['id', 'symbol', 'name']) writer.writeheader()