#NEWLINE# def ensure_tombstone_in_right_location( self , q_policy_index , account , container , obj , q_ts , path , container_policy_index , source_ts , **kwargs ) : #NEWLINE# #INDENT# '\n        Issue a DELETE request against the destination to match the\n        misplaced DELETE against the source.\n        ' #NEWLINE# delete_timestamp = slightly_later_timestamp ( q_ts , offset = 2 ) #NEWLINE# self . stats_log ( 'delete_attempt' , '%r (%f) in policy_index %s will be deleted from policy_index %s (%s)' , path , source_ts , container , container_policy_index , delete_timestamp ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'X-Backend-Storage-Policy-Index' : container_policy_index , #NEWLINE# 'X-Timestamp' : delete_timestamp , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# self . swift . delete_object ( account , container , obj , headers = headers ) #NEWLINE# #UNINDENT# except UnexpectedResponse as err : #NEWLINE# #INDENT# self . stats_log ( 'delete_failed' , 'delete %r (%f) from policy_index %s (%s) returned %s' , path , source_ts , container_policy_index , delete_timestamp , err , level = logging . WARNING ) #NEWLINE# return False #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . stats_log ( 'unhandled_error' , 'unable to delete %r (%f) from policy_index %s (%s)' , path , source_ts , container_policy_index , delete_timestamp , level = logging . ERROR , exc_info = True ) #NEWLINE# return False #NEWLINE# #UNINDENT# self . stats_log ( 'delete_success' , '%r (%f) deleted from policy_index %s (%s)' , path , source_ts , container_policy_index , delete_timestamp , level = logging . INFO ) #NEWLINE# return self . throw_tombstones ( account , container , obj , q_ts , q_policy_index , path )