Kaydet (Commit) e134e896 authored tarafından Matthias Erll's avatar Matthias Erll

Wrap response socket for platform compatibility.

üst 24b8d668
......@@ -17,6 +17,7 @@ import os
import re
import shlex
import struct
from socket import socket as socket_wrapper
import warnings
import requests
......@@ -264,7 +265,7 @@ class Client(requests.Session):
def _stream_helper(self, response):
"""Generator for data coming from a chunked-encoded HTTP response."""
socket_fp = self._get_raw_response_socket(response)
socket_fp = socket_wrapper(_sock=self._get_raw_response_socket(response))
socket_fp.setblocking(1)
socket = socket_fp.makefile()
while True:
......
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