Merge pull request #111 from dec0dedab0de/develop

using readlines() in _tsv.py fixes a small bug.
This commit is contained in:
Kenneth Reitz 2014-01-08 11:44:20 -08:00
commit 9c2018653f
3 changed files with 5 additions and 4 deletions

View File

@ -3,5 +3,6 @@ python:
- 2.6
- 2.7
- 3.2
install: python setup.py install
install:
- python setup.py install
script: python test_tablib.py

View File

@ -34,9 +34,9 @@ def import_set(dset, in_stream, headers=True):
dset.wipe()
if is_py3:
rows = csv.reader(in_stream.split('\r\n'), delimiter='\t')
rows = csv.reader(in_stream.splitlines(), delimiter='\t')
else:
rows = csv.reader(in_stream.split('\r\n'), delimiter='\t',
rows = csv.reader(in_stream.splitlines(), delimiter='\t',
encoding=DEFAULT_ENCODING)
for i, row in enumerate(rows):

View File

@ -46,7 +46,7 @@ def import_book(dbook, in_stream):
dbook.wipe()
for sheet in yaml.safe_load(in_stream):
for sheet in yaml.load(in_stream):
data = tablib.Dataset()
data.title = sheet['title']
data.dict = sheet['data']