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

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

Issue 25004007: Update 'requests' lib to v2.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 2 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
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 2
3 """ 3 """
4 requests.exceptions 4 requests.exceptions
5 ~~~~~~~~~~~~~~~~~~~ 5 ~~~~~~~~~~~~~~~~~~~
6 6
7 This module contains the set of Requests' exceptions. 7 This module contains the set of Requests' exceptions.
8 8
9 """ 9 """
10 10
11 11
12 class RequestException(RuntimeError): 12 class RequestException(IOError):
13 """There was an ambiguous exception that occurred while handling your 13 """There was an ambiguous exception that occurred while handling your
14 request.""" 14 request."""
15 15
16 16
17 class HTTPError(RequestException): 17 class HTTPError(RequestException):
18 """An HTTP error occurred.""" 18 """An HTTP error occurred."""
19 19
20 def __init__(self, *args, **kwargs): 20 def __init__(self, *args, **kwargs):
21 """ Initializes HTTPError with optional `response` object. """ 21 """ Initializes HTTPError with optional `response` object. """
22 self.response = kwargs.pop('response', None) 22 self.response = kwargs.pop('response', None)
(...skipping 23 matching lines...) Expand all
46 class MissingSchema(RequestException, ValueError): 46 class MissingSchema(RequestException, ValueError):
47 """The URL schema (e.g. http or https) is missing.""" 47 """The URL schema (e.g. http or https) is missing."""
48 48
49 49
50 class InvalidSchema(RequestException, ValueError): 50 class InvalidSchema(RequestException, ValueError):
51 """See defaults.py for valid schemas.""" 51 """See defaults.py for valid schemas."""
52 52
53 53
54 class InvalidURL(RequestException, ValueError): 54 class InvalidURL(RequestException, ValueError):
55 """ The URL provided was somehow invalid. """ 55 """ The URL provided was somehow invalid. """
56
57
58 class ChunkedEncodingError(RequestException):
59 """The server declared chunked encoding but sent an invalid chunk."""
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698