Kaydet (Commit) 7a462970 authored tarafından Joffrey F's avatar Joffrey F

Merge pull request #316 from Precis/socket_wrapper

Wrap response socket for platform compatibility.
......@@ -17,6 +17,7 @@ import os
import re
import shlex
import struct
from socket import socket as socket_obj
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_obj(_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