projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ff6f75
)
Clean up handle_redirect.
author
Yossi Gottlieb
<yossigo@gmail.com>
Thu, 23 Oct 2014 10:46:44 +0000
(13:46 +0300)
committer
Yossi Gottlieb
<yossigo@gmail.com>
Thu, 23 Oct 2014 10:46:44 +0000
(13:46 +0300)
requests/auth.py
patch
|
blob
|
history
diff --git
a/requests/auth.py
b/requests/auth.py
index b2b341f5cb913d7be466e30e14a3b594b47654a4..010919f31f55f96948053941038031f42656b763 100644
(file)
--- a/
requests/auth.py
+++ b/
requests/auth.py
@@
-153,9
+153,7
@@
class HTTPDigestAuth(AuthBase):
def handle_redirect(self, r, **kwargs):
"""Reset num_401_calls counter on redirects."""
- if r.status_code in (
- codes.temporary_redirect,
- codes.permanent_redirect):
+ if r.is_redirect:
setattr(self, 'num_401_calls', 1)
def handle_401(self, r, **kwargs):