lineterminator newline
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 27 Dec 2020 18:03:02 +0000 (18:03 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 27 Dec 2020 18:03:08 +0000 (18:03 +0000)
openpower/sv_analysis.py

index 4aece594f8bc4a3e44d5fd5e95b65bd2fb24721a..d4f7b16c7062069e819092806832e2e5e6b701f0 100644 (file)
@@ -35,8 +35,8 @@ def get_csv(name):
 # Write an array of dictionaries to the CSV file name:
 def write_csv(name, items, headers):
     file_path = find_wiki_file(name)
-    with open(file_path, 'w') as csvfile:
-        writer = csv.DictWriter(csvfile, headers)
+    with open(file_path, 'wb') as csvfile:
+        writer = csv.DictWriter(csvfile, headers, lineterminator="\n")
         writer.writeheader()
         writer.writerows(items)