Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/requests/exceptions.py

Issue 24076010: Add 'requests' library to third_party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # -*- coding: utf-8 -*-
2
3 """
4 requests.exceptions
5 ~~~~~~~~~~~~~~~~~~~
6
7 This module contains the set of Requests' exceptions.
8
9 """
10
11
12 class RequestException(RuntimeError):
13 """There was an ambiguous exception that occurred while handling your
14 request."""
15
16
17 class HTTPError(RequestException):
18 """An HTTP error occurred."""
19
20 def __init__(self, *args, **kwargs):
21 """ Initializes HTTPError with optional `response` object. """
22 self.response = kwargs.pop('response', None)
23 super(HTTPError, self).__init__(*args, **kwargs)
24
25
26 class ConnectionError(RequestException):
27 """A Connection error occurred."""
28
29
30 class SSLError(ConnectionError):
31 """An SSL error occurred."""
32
33
34 class Timeout(RequestException):
35 """The request timed out."""
36
37
38 class URLRequired(RequestException):
39 """A valid URL is required to make a request."""
40
41
42 class TooManyRedirects(RequestException):
43 """Too many redirects."""
44
45
46 class MissingSchema(RequestException, ValueError):
47 """The URL schema (e.g. http or https) is missing."""
48
49
50 class InvalidSchema(RequestException, ValueError):
51 """See defaults.py for valid schemas."""
52
53
54 class InvalidURL(RequestException, ValueError):
55 """ The URL provided was somehow invalid. """
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698