diff options
| author | Brad Pitcher <bradpitcher@gmail.com> | 2014-04-30 16:48:12 -0700 |
|---|---|---|
| committer | Brad Pitcher <bradpitcher@gmail.com> | 2014-05-01 08:12:39 -0700 |
| commit | 49d8cb816f163ab5239ec9552c5d60cd0e386557 (patch) | |
| tree | eb9d77d2109dd17b1a4ea4f5dec4b1fd7ba45126 /tablib | |
| parent | fbd277ff2ef96343fa4bb41e5fff6c37af674951 (diff) | |
| download | tablib-49d8cb816f163ab5239ec9552c5d60cd0e386557.tar.gz | |
allow csv fields to have multiple lines
Diffstat (limited to 'tablib')
| -rw-r--r-- | tablib/formats/_csv.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tablib/formats/_csv.py b/tablib/formats/_csv.py index c5d3202..7597395 100644 --- a/tablib/formats/_csv.py +++ b/tablib/formats/_csv.py @@ -35,9 +35,9 @@ def import_set(dset, in_stream, headers=True): dset.wipe() if is_py3: - rows = csv.reader(in_stream.splitlines()) + rows = csv.reader(StringIO(in_stream)) else: - rows = csv.reader(in_stream.splitlines(), encoding=DEFAULT_ENCODING) + rows = csv.reader(StringIO(in_stream), encoding=DEFAULT_ENCODING) for i, row in enumerate(rows): if (i == 0) and (headers): |
