Commit 19dc8b66 authored by Denis Bilenko's avatar Denis Bilenko

socket: make sendall() handle unicode argument properly

parent d8a9b3c1
......@@ -383,6 +383,8 @@ class socket(object):
raise
def sendall(self, data, flags=0):
if isinstance(data, unicode):
data = data.encode()
# this sendall is also reused by SSL subclasses (both from ssl and sslold modules),
# so it should not call self._sock methods directly
if self.timeout is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment