collate.py: Also newline='\n' on other open-for-write

This commit is contained in:
Athanasius committed 2021-04-12 08:31:47 +01:00
1 parent dbfa50739f
commit c17e6ecade
1 file changed
+2 -2
+2 -2
View File
@@ -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()