Make ContentDecodingError a subclass.

This should avoid the user having to worry about the new exception.
This commit is contained in:
Cory Benfield
2014-01-09 19:08:58 +00:00
parent 14f207f3fc
commit 4862d29a96
+2 -1
View 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"""