#NEWLINE# @ staticmethod #NEWLINE# def sanitize_params( input_params ) : #NEWLINE# #INDENT# ( params , files ) = ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# for ( k , v ) in input_params . items ( ) : #NEWLINE# #INDENT# if ( hasattr ( v , 'read' ) and callable ( v . read ) ) : #NEWLINE# #INDENT# files [ k ] = v #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( v , bool ) : #NEWLINE# #INDENT# if v : #NEWLINE# #INDENT# params [ k ] = 'true' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# params [ k ] = 'false' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( k , list ) : #NEWLINE# #INDENT# params [ k ] = ',' . join ( v ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# params [ k ] = v #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( params , files )