🐛 make UnicodeWriter to work with python 3
This commit is contained in:
parent
b3e7d83585
commit
60d375b25d
|
@ -35,7 +35,8 @@ class UnicodeWriter(object):
|
|||
for s in row])
|
||||
# Fetch UTF-8 output from the queue ...
|
||||
data = self.queue.getvalue()
|
||||
data = data.decode("utf-8")
|
||||
if compact.PY2:
|
||||
data = data.decode("utf-8")
|
||||
# ... and reencode it into the target encoding
|
||||
data = self.encoder.encode(data)
|
||||
# write to the target stream
|
||||
|
|
Loading…
Reference in New Issue