Skip to content

Commit 74a9647

Browse files
committed
fix new lines - csv standard which is windows style \r\n - this is what legacy downloader used so lets stick with that for identical csv files
1 parent 90d2662 commit 74a9647

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simt_emlite/smip/smip_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def write(
6666

6767
# Write CSV file
6868
with open(full_csv_path, "w", newline="") as csvfile:
69-
writer = csv.writer(csvfile, quoting=csv.QUOTE_ALL)
69+
writer = csv.writer(csvfile, quoting=csv.QUOTE_ALL, lineterminator="\r\n")
7070

7171
# Build column name with optional element marker (e.g., "EML123456789-A")
7272
column_name = f"{serial}-{element_marker}" if element_marker else serial
@@ -97,7 +97,7 @@ def write(
9797
)
9898

9999
# Write the raw line directly to avoid quoting data rows
100-
csvfile.write(f"{timestamp_str},{import_str},{export_str}\n")
100+
csvfile.write(f"{timestamp_str},{import_str},{export_str}\r\n")
101101

102102
@staticmethod
103103
def write_from_profile_records(

0 commit comments

Comments
 (0)