mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Make ContentDecodingError a subclass.
This should avoid the user having to worry about the new exception.
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user