def __init__ ( self , response ) : self . response = response super ( ResponseException , self ) . __init__ ( "received {} HTTP response" . format ( response . status_code ) )
make response python constructor
Initialize a ResponseException instance .
def __init__(self, response):
        """Initialize a ResponseException instance.

        :param response: A requests.response instance.

        """
        self.response = response
        super(ResponseException, self).__init__(
            "received {} HTTP response".format(response.status_code)
        )