Merge pull request #111 from dec0dedab0de/develop
using readlines() in _tsv.py fixes a small bug.
This commit is contained in:
commit
9c2018653f
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue