def MakeHTTPException(code=500, msg='Error'):
 response = requests.Response()
 response.status_code = code
 return requests.ConnectionError(msg, response=response)

def MakeHTTPException ( code = 500 , msg = 'Error' ) : response = requests . Response ( ) response . status_code = code return requests . ConnectionError ( msg , response = response )
a helper for creating a httperror exception .