diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-05-22 15:13:40 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-05-22 15:13:40 -0400 |
| commit | 65873b611289fe917b6d62c5aacbe7b70878a373 (patch) | |
| tree | 4a4a099ebb75849798012c604f9c8cebca41d6b1 | |
| parent | 56e44bd45cf3f2e03a81faa212cfd71cc9451028 (diff) | |
| download | tablib-65873b611289fe917b6d62c5aacbe7b70878a373.tar.gz | |
BytesIO
| -rw-r--r-- | tablib/formats/_csv.py | 4 | ||||
| -rw-r--r-- | tablib/formats/_tsv.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tablib/formats/_csv.py b/tablib/formats/_csv.py index 2c0bfc2..7581246 100644 --- a/tablib/formats/_csv.py +++ b/tablib/formats/_csv.py @@ -7,7 +7,7 @@ import os import tablib -from tablib.compat import is_py3, StringIO, csv +from tablib.compat import is_py3, BytesIO, csv title = 'csv' @@ -20,7 +20,7 @@ DEFAULT_ENCODING = 'utf-8' def export_set(dataset): """Returns CSV representation of Dataset.""" - stream = StringIO() + stream = () if is_py3: _csv = csv.writer(stream) diff --git a/tablib/formats/_tsv.py b/tablib/formats/_tsv.py index 54838b1..85f9396 100644 --- a/tablib/formats/_tsv.py +++ b/tablib/formats/_tsv.py @@ -6,7 +6,7 @@ import os import tablib -from tablib.compat import is_py3, csv, StringIO +from tablib.compat import is_py3, csv, BytesIO @@ -17,7 +17,7 @@ DEFAULT_ENCODING = 'utf-8' def export_set(dataset): """Returns a TSV representation of Dataset.""" - stream = StringIO() + stream = BytesIO() if is_py3: _tsv = csv.writer(stream, delimiter="\t") |
