#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Initialize RequestException with `request` and `response` objects.\n        ' #NEWLINE# response = kwargs . pop ( 'response' , None ) #NEWLINE# self . response = response #NEWLINE# self . request = kwargs . pop ( 'request' , None ) #NEWLINE# if ( ( response is not None ) and ( not self . request ) and hasattr ( response , 'request' ) ) : #NEWLINE# #INDENT# self . request = self . response . request #NEWLINE# #UNINDENT# super ( ) . __init__ ( * args , ** kwargs )