Skip to content

Commit 3cec614

Browse files
author
Kenneth Reitz
committed
ignore http errors in redirect loops
1 parent 5708fe9 commit 3cec614

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

requests/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ def send(self, anyway=False):
232232

233233
except urllib2.HTTPError, why:
234234
self._build_response(why)
235-
self.response.error = why
235+
if not self.redirect:
236+
self.response.error = why
236237
else:
237238
self._build_response(resp)
238239
self.response.ok = True

0 commit comments

Comments
 (0)