fix the tests

This commit is contained in:
2017-05-26 21:15:58 -04:00
parent ce64cce14e
commit f41560c5d4
+4 -1
View File
@@ -674,7 +674,10 @@ class Session(SessionRedirectMixin):
# If redirects aren't being followed, store the response on the Request for Response.next().
if not allow_redirects:
r._next = self.resolve_redirects(r, request, yield_responses=False, **kwargs).next()
try:
r._next = self.resolve_redirects(r, request, yield_responses=False, **kwargs).next()
except StopIteration:
pass
if not stream:
r.content