Minor update

This commit is contained in:
Miroslav Stampar 2012-12-27 15:14:40 +01:00
parent 6ae4590edc
commit 127b880577
2 changed files with 8 additions and 6 deletions

4
.gitattributes vendored
View File

@ -1,4 +1,4 @@
* text eol=lf *.py text eol=lf
*_ binary *_ binary
*.dll binary *.dll binary
@ -9,3 +9,5 @@
*.x32 binary *.x32 binary
*.x64 binary *.x64 binary
*.exe binary *.exe binary
*.sln binary
*.vcproj binary

View File

@ -29,11 +29,11 @@ class SmartHTTPBasicAuthHandler(urllib2.HTTPBasicAuthHandler):
self.retried_req.add(hash(req)) self.retried_req.add(hash(req))
self.retried_count = 0 self.retried_count = 0
else: else:
if self.retried_count > 5: if self.retried_count > 5:
raise urllib2.HTTPError(req.get_full_url(), 401, "basic auth failed", raise urllib2.HTTPError(req.get_full_url(), 401, "basic auth failed",
headers, None) headers, None)
else: else:
self.retried_count += 1 self.retried_count += 1
return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed( return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed(
self, auth_header, host, req, headers) self, auth_header, host, req, headers)