#NEWLINE# def sample_request( self , command , sample , async ) : #NEWLINE# #INDENT# url = ( 'http://%s:%d' % ( self . host , async . port ) ) #NEWLINE# files = { #NEWLINE# #INDENT# 'file' : open ( sample , 'rb' ) , #NEWLINE# #UNINDENT# } #NEWLINE# response = requests . post ( url , files = files , params = { #NEWLINE# #INDENT# 'command' : command , #NEWLINE# 'sample' : os . path . basename ( sample ) , #NEWLINE# 'async' : int ( async ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# response . raise_for_status ( ) #NEWLINE# return response