#NEWLINE# def _enqueue_multipart_tasks( self , filename ) : #NEWLINE# #INDENT# num_uploads = 1 #NEWLINE# if ( filename . operation_name == 'upload' ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_multipart_upload_tasks ( filename ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( num_uploads . operation_name == 'move' ) : #NEWLINE# #INDENT# if ( ( filename . src_type == 'local' ) and ( filename . dest_type == 's3' ) ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_multipart_upload_tasks ( filename , remove_local_file = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( filename . src_type == 's3' ) and ( filename . dest_type == 'local' ) ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_range_download_tasks ( filename , remove_remote_file = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( filename . src_type == 's3' ) and ( filename . dest_type == 's3' ) ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_multipart_copy_tasks ( filename , remove_remote_file = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( 'Unknown transfer type of %s -> %s' % ( filename . src_type , filename . dest_type ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( filename . operation_name == 'copy' ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_multipart_copy_tasks ( filename , remove_remote_file = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( filename . operation_name == 'download' ) : #NEWLINE# #INDENT# num_uploads = self . _enqueue_range_download_tasks ( filename ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return num_uploads