Skip to content

Commit d33dbc2

Browse files
committed
output Update 56ae33f for python3
We dropped python2 support in the middle of this work so updating 56ae33f to reflect this. Also remove duplicate csv import.
1 parent 5e0a438 commit d33dbc2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

flattentool/output.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88
from openpyxl.cell.cell import ILLEGAL_CHARACTERS_RE
99
import csv
1010
import os
11-
import sys
1211
from warnings import warn
1312
from flattentool.exceptions import DataErrorWarning
1413

1514
from odf.opendocument import OpenDocumentSpreadsheet
1615
import odf.table
1716
import odf.text
1817

19-
import csv
20-
2118

2219
class SpreadsheetOutput(object):
2320
# output_name is given a default here, partly to help with tests,
@@ -128,7 +125,7 @@ def write_sheet(self, sheet_name, sheet):
128125
row = odf.table.TableRow()
129126
for header in sheet_header:
130127
value = sheet_line.get(header)
131-
if isinstance(value, six.text_type):
128+
if isinstance(value, str):
132129
new_value = ILLEGAL_CHARACTERS_RE.sub('', value)
133130
if new_value != value:
134131
warn("Character(s) in '{}' are not allowed in a spreadsheet cell. Those character(s) will be removed".format(value),

0 commit comments

Comments
 (0)