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