Skip to content
Myr

Raise Timeout on request timeouts

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Johannes · committed by Johannes · parent 59c747b · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/models.py+5 added
236 unmodified lines
237 except urllib2.HTTPError, why:238 self._build_response(why)239 if not self.redirect:240 self.response.error = why241 except urllib2.URLError, error:242 raise Timeout if isinstance(error.reason, socket.timeout) else error243 else:244 self._build_response(resp)245 self.response.ok = True246
245 unmodified lines
492 request."""493494class AuthenticationError(RequestException):495 """The authentication credentials provided were invalid."""496 497class Timeout(RequestException):498 """The request timed out."""499500class URLRequired(RequestException):501 """A valid URL is required to make a request."""502
2 unmodified lines