#NEWLINE# def handle_upload_object( self , object_info , letter = 'A' ) : #NEWLINE# #INDENT# if object_info . get ( 'head_first' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# headers = self . ignoring_http_responses ( ( 503 , ) , client . head_object , object_info ) #NEWLINE# #UNINDENT# except client . ClientException : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _put_results_from_response ( object_info , headers ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# object_info [ 'size' ] = int ( object_info [ 'size' ] ) #NEWLINE# block_size = ( object_info . get ( 'block_size' ) or DEFAULT_BLOCK_SIZE ) #NEWLINE# contents = ( letter * block_size ) #NEWLINE# send_headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if object_info . get ( 'delete_after' ) : #NEWLINE# #INDENT# send_headers . update ( { #NEWLINE# #INDENT# 'x-delete-after' : object_info . get ( 'delete_after' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# headers = self . ignoring_http_responses ( ( 503 , ) , client . put_object , object_info , content_length = object_info [ 'size' ] , chunk_size = headers , contents = contents , headers = send_headers ) #NEWLINE# self . _put_results_from_response ( object_info , headers )