Skip to content

Commit

Permalink
Append the new lines as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
georgiana-b committed May 19, 2016
1 parent 06666e3 commit 9b9883a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goodtables/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def csv_reader(data, dialect=csv.excel, header_index=0, **kwargs):
dialect = detect_dialect(first_lines)

while not re.findall('[^\w ]', dialect.delimiter):
first_lines.extend(list(data.readline()))
first_lines.append(data.readline())
dialect = detect_dialect(first_lines)

def iterenc_utf8(data):
Expand Down Expand Up @@ -91,7 +91,7 @@ def line_iterator(data):
dialect = detect_dialect(first_lines)

while not re.findall('[^\w ]', dialect.delimiter):
first_lines.extend(list(data.readline()))
first_lines.append(data.readline())
dialect = detect_dialect(first_lines)

data.seek(0)
Expand Down

0 comments on commit 9b9883a

Please sign in to comment.