Kaydet (Commit) af84a2de authored tarafından Karl-Aksel Puulmann's avatar Karl-Aksel Puulmann

Python 3 fixes

üst 375521d7
......@@ -228,6 +228,9 @@ class Client(requests.Session):
def _get_raw_response_socket(self, response):
self._raise_for_status(response)
if six.PY3:
return response.raw._fp.fp.raw._sock
else:
return response.raw._fp.fp._sock
def _stream_helper(self, response):
......@@ -264,6 +267,9 @@ class Client(requests.Session):
socket = self._get_raw_response_socket(response)
def recvall(socket, size):
if six.PY3:
data = bytes()
else:
data = ''
while size > 0:
block = socket.recv(size)
......
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