summaryrefslogtreecommitdiff
path: root/Lib/socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/socket.py')
-rwxr-xr-xLib/socket.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index 5276cc8ba3..fc11eb783c 100755
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -337,6 +337,7 @@ class socket(_socket.socket):
buffer = io.BufferedWriter(raw, buffering)
if binary:
return buffer
+ encoding = io.text_encoding(encoding)
text = io.TextIOWrapper(buffer, encoding, errors, newline)
text.mode = mode
return text