#NEWLINE# def run_and_check( self , session , prepped_request , extra_options ) : #NEWLINE# #INDENT# '\n        Grabs extra options like timeout and actually runs the request,\n        checking for the result\n        ' #NEWLINE# extra_options = ( extra_options or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# response = session . send ( prepped_request , stream = extra_options . get ( 'stream' , False ) , verify = extra_options . get ( 'verify' , False ) , proxies = extra_options . get ( 'proxies' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , cert = extra_options . get ( 'cert' ) , timeout = extra_options . get ( 'timeout' ) , allow_redirects = extra_options . get ( 'allow_redirects' , True ) ) #NEWLINE# try : #NEWLINE# #INDENT# response . raise_for_status ( ) #NEWLINE# #UNINDENT# except requests . exceptions . HTTPError : #NEWLINE# #INDENT# logging . error ( ( 'HTTP error: ' + response . reason ) ) #NEWLINE# if ( response . method != 'GET' ) : #NEWLINE# #INDENT# logging . error ( response . text ) #NEWLINE# #UNINDENT# raise AirflowException ( ( ( str ( response . status_code ) + ':' ) + response . reason ) ) #NEWLINE# #UNINDENT# return response