(self, data, decode_content, flush_decoder)
return data
Decode the data passed in and potentially flush the decoder.
Decode the data passed in and potentially flush the decoder.
Decode the data passed in and potentially flush the decoder .
def _decode(self, data, decode_content, flush_decoder):
        """
        Decode the data passed in and potentially flush the decoder.
        """
        if not decode_content:
            return data

        try:
            if self._decoder:
                data = self._decoder.decompress(data)
        except self.DECODER_ERROR_CLASSES as e:
            content_encoding = self.headers.get('content-encoding', '').lower()
            raise DecodeError(
                "Received response with content-encoding: %s, but "
                "failed to decode it." % content_encoding, e)
        if flush_decoder:
            data += self._flush_decoder()

        return data
def _decode ( self , data , decode_content , flush_decoder ) : if not decode_content : return data try : if self . _decoder : data = self . _decoder . decompress ( data ) except self . DECODER_ERROR_CLASSES as e : content_encoding = self . headers . get ( 'content-encoding' , '' ) . lower ( ) raise DecodeError ( "Received response with content-encoding: %s, but " "failed to decode it." % content_encoding , e ) if flush_decoder : data += self . _flush_decoder ( ) return data