Merge pull request #5975 from codingCoffee/csvutils

[fix] error while importing csv file
This commit is contained in:
Ameya Shenoy 2018-08-16 18:11:24 +05:30 committed by GitHub
commit 6cc5547eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,10 @@ def read_csv_content(fcontent, ignore_encoding=False):
fcontent = fcontent.encode("utf-8")
content = [ ]
for line in fcontent.splitlines(True):
content.append(line)
if six.PY2:
content.append(line)
else:
content.append(frappe.safe_decode(line))
try:
rows = []