Show More
@@ -419,17 +419,8 b' class httpdigestauthhandler(urllib2.HTTP' | |||||
419 | if req is not self.retried_req: |
|
419 | if req is not self.retried_req: | |
420 | self.retried_req = req |
|
420 | self.retried_req = req | |
421 | self.retried = 0 |
|
421 | self.retried = 0 | |
422 | # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if |
|
422 | return urllib2.HTTPDigestAuthHandler.http_error_auth_reqed( | |
423 | # it doesn't know about the auth type requested. This can happen if |
|
423 | self, auth_header, host, req, headers) | |
424 | # somebody is using BasicAuth and types a bad password. |
|
|||
425 | try: |
|
|||
426 | return urllib2.HTTPDigestAuthHandler.http_error_auth_reqed( |
|
|||
427 | self, auth_header, host, req, headers) |
|
|||
428 | except ValueError as inst: |
|
|||
429 | arg = inst.args[0] |
|
|||
430 | if arg.startswith("AbstractDigestAuthHandler doesn't know "): |
|
|||
431 | return |
|
|||
432 | raise |
|
|||
433 |
|
424 | |||
434 | class httpbasicauthhandler(urllib2.HTTPBasicAuthHandler): |
|
425 | class httpbasicauthhandler(urllib2.HTTPBasicAuthHandler): | |
435 | def __init__(self, *args, **kwargs): |
|
426 | def __init__(self, *args, **kwargs): |
General Comments 0
You need to be logged in to leave comments.
Login now