Make ContentDecodingError a subclass.
authorCory Benfield <lukasaoz@gmail.com>
Thu, 9 Jan 2014 19:08:58 +0000 (19:08 +0000)
committerCory Benfield <lukasaoz@gmail.com>
Thu, 9 Jan 2014 19:08:58 +0000 (19:08 +0000)
This should avoid the user having to worry about the new exception.

requests/exceptions.py

index 7caf4db..cd3c760 100644 (file)
@@ -7,6 +7,7 @@ requests.exceptions
 This module contains the set of Requests' exceptions.
 
 """
+from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
 
 
 class RequestException(IOError):
@@ -63,5 +64,5 @@ class ChunkedEncodingError(RequestException):
     """The server declared chunked encoding but sent an invalid chunk."""
 
 
-class ContentDecodingError(RequestException):
+class ContentDecodingError(RequestException, BaseHTTPError):
     """Failed to decode response content"""