mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
Merge pull request #111 from dec0dedab0de/develop
using readlines() in _tsv.py fixes a small bug.
This commit is contained in:
+2
-1
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user