Merge "Handle StopIteration for Py3.7"
This commit is contained in:
commit
362d003f01
@ -395,7 +395,10 @@ class ResponseBodyIterator(object):
|
||||
|
||||
def __iter__(self):
|
||||
while True:
|
||||
yield self.next()
|
||||
try:
|
||||
yield self.next()
|
||||
except StopIteration:
|
||||
return
|
||||
|
||||
def next(self):
|
||||
chunk = self.resp.read(CHUNKSIZE)
|
||||
|
Loading…
Reference in New Issue
Block a user