From 4862d29a96d83c1503048b0e12de23aa2b8e4aa4 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 9 Jan 2014 19:08:58 +0000 Subject: [PATCH] Make ContentDecodingError a subclass. This should avoid the user having to worry about the new exception. --- requests/exceptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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""" -- 2.34.1