From 9711818da985bc9523cc7cc0b4dcaca15c902002 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jul 2021 10:52:13 +0100 Subject: [PATCH] CRLF ending for csv --- shares.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shares.py b/shares.py index 8f29c7593..f217eb0f9 100644 --- a/shares.py +++ b/shares.py @@ -963,7 +963,7 @@ def sharesCatalogCSVEndpoint(baseDir: str, httpPrefix: str, return '' csvStr = \ 'id,type,hasType,startDate,expiryDate,' + \ - 'quantity,price,Image,description\n' + 'quantity,price,Image,description\r\n' for item in catalogJson['DFC:supplies']: csvStr += '"' + item['@id'] + '",' csvStr += '"' + item['@type'] + '",' @@ -974,7 +974,7 @@ def sharesCatalogCSVEndpoint(baseDir: str, httpPrefix: str, csvStr += item['DFC:price'] + ',' csvStr += '"' + item['DFC:Image'] + '",' description = item['DFC:description'].replace('"', "'") - csvStr += '"' + description + '"\n' + csvStr += '"' + description + '",\r\n' return csvStr