summaryrefslogtreecommitdiff
path: root/Lib/codecs.py
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2019-05-22 09:28:39 -0700
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-22 09:28:38 -0700
commit81c5ec9e417aebfe92945a05771006e4241f4e08 (patch)
tree731e7d06225a688fc561adbb589902ddccca42d0 /Lib/codecs.py
parenta58db9628d0c96cc5b863137fed4e432238f8027 (diff)
downloadcpython-git-81c5ec9e417aebfe92945a05771006e4241f4e08.tar.gz
[3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502)
A very simple fix. I found this while writing typeshed stubs for StreamRecoder. https://bugs.python.org/issue33482. (cherry picked from commit b3be4072888a4ce054993c2801802721466ea02d) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> https://bugs.python.org/issue33482
Diffstat (limited to 'Lib/codecs.py')
-rw-r--r--Lib/codecs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index a70ed20f2b..3cd78fc9f1 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -838,7 +838,7 @@ class StreamRecoder:
def writelines(self, list):
- data = ''.join(list)
+ data = b''.join(list)
data, bytesdecoded = self.decode(data, self.errors)
return self.writer.write(data)