summaryrefslogtreecommitdiff
path: root/tablib
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.org>2014-01-08 11:44:20 -0800
committerKenneth Reitz <me@kennethreitz.org>2014-01-08 11:44:20 -0800
commit9c2018653fc8d02f1db727dd73cfc61b3fcfa81d (patch)
tree857673f6e9ae71a934e4b43f62da83e12d8027a3 /tablib
parent7f0748aac9d561672ecf41684c28d97e4e186229 (diff)
parent9e45b95d1238fa530ee7b26a7f0acb6443c10907 (diff)
downloadtablib-9c2018653fc8d02f1db727dd73cfc61b3fcfa81d.tar.gz
Merge pull request #111 from dec0dedab0de/develop
using readlines() in _tsv.py fixes a small bug.
Diffstat (limited to 'tablib')
-rw-r--r--tablib/formats/_tsv.py4
-rw-r--r--tablib/formats/_yaml.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tablib/formats/_tsv.py b/tablib/formats/_tsv.py
index 816b6e3..8ef2b67 100644
--- a/tablib/formats/_tsv.py
+++ b/tablib/formats/_tsv.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):
diff --git a/tablib/formats/_yaml.py b/tablib/formats/_yaml.py
index 91a3baa..e2ccf46 100644
--- a/tablib/formats/_yaml.py
+++ b/tablib/formats/_yaml.py
@@ -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']