Commit b0880419 authored by Yusei Tahara's avatar Yusei Tahara

Fix a bug on Retry.read. It should have the same arguments as httplib.HTTPResponse.read.

parent cedc3d8f
......@@ -142,13 +142,13 @@ class Retry(object):
finally:
connection.close()
def read(self, size=16*1024):
data = self.response.read(size)
def read(self, amt=None):
data = self.response.read(amt)
if not data:
if self.position < self.content_length:
self.getresponse()
if self.response is not None:
data = self.response.read(size)
data = self.response.read(amt)
self.position += len(data)
return data
......
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