From: Cory Benfield Date: Thu, 9 Jan 2014 19:08:58 +0000 (+0000) Subject: Make ContentDecodingError a subclass. X-Git-Tag: v2.2.0~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4862d29a96d83c1503048b0e12de23aa2b8e4aa4;p=services%2Fpython-requests.git Make ContentDecodingError a subclass. This should avoid the user having to worry about the new exception. --- diff --git a/requests/exceptions.py b/requests/exceptions.py index 7caf4db..cd3c760 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -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"""