#NEWLINE# def SetTransaction( self , found , request , response ) : #NEWLINE# #INDENT# if ( self . URL != response . url ) : #NEWLINE# #INDENT# if ( response . code not in [ 302 , 301 ] ) : #NEWLINE# #INDENT# self . Status = ( str ( 302 ) + ' Found' ) #NEWLINE# self . Status += ( ( ' --Redirect--> ' + str ( self . code ) ) + ' ' ) #NEWLINE# self . Status += response . msg #NEWLINE# #UNINDENT# if ( self . URL . split ( ':' ) [ 0 ] != response . url . split ( ':' ) [ 0 ] ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . URL = response . url #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . Status = ( ( str ( response . code ) + ' ' ) + response . msg ) #NEWLINE# #UNINDENT# self . RawRequest = request #NEWLINE# self . Found = found #NEWLINE# self . ResponseHeaders = response . headers #NEWLINE# self . ResponseContents = response . read ( ) #NEWLINE# self . checkIfCompressed ( response , self . ResponseContents ) #NEWLINE# self . EndRequest ( )