From: Kenneth Reitz Date: Wed, 17 Aug 2011 04:00:47 +0000 (-0400) Subject: todo X-Git-Tag: v0.6.0~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b11cf21f3d703315f4ae82ee493ee52a57d0b30;p=services%2Fpython-requests.git todo --- diff --git a/requests/models.py b/requests/models.py index a277555..693aaa4 100644 --- a/requests/models.py +++ b/requests/models.py @@ -128,6 +128,7 @@ class Request(object): if self.auth: if not isinstance(self.auth.handler, (urllib2.AbstractBasicAuthHandler, urllib2.AbstractDigestAuthHandler)): + # TODO: REMOVE THIS COMPLETELY auth_manager.add_password(self.auth.realm, self.url, self.auth.username, self.auth.password) self.auth.handler = self.auth.handler(auth_manager) auth_manager.add_auth(self.url, self.auth) @@ -314,14 +315,14 @@ class Request(object): # timeout argument is new since Python v2.6 if not "timeout" in str(err): raise - + if settings.timeout_fallback: # fall-back and use global socket timeout (This is not thread-safe!) old_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(self.timeout) - + resp = opener(req) - + if settings.timeout_fallback: # restore gobal timeout socket.setdefaulttimeout(old_timeout)