#NEWLINE# def _emptyBucketCallback( self , result , bucket ) : #NEWLINE# #INDENT# xml = ET . XML ( result [ 'response' ] ) #NEWLINE# key_nodes = xml . findall ( ( './/%sKey' % S3_NAMESPACE ) ) #NEWLINE# delete_deferreds = [ ] #NEWLINE# for node in key_nodes : #NEWLINE# #INDENT# delete_deferreds . append ( self . deleteObject ( bucket , node . text ) ) #NEWLINE# #UNINDENT# if ( len ( delete_deferreds ) == 0 ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# d = DeferredList ( delete_deferreds ) #NEWLINE# if ( xml . find ( ( './/%sIsTruncated' % S3_NAMESPACE ) ) . text == 'false' ) : #NEWLINE# #INDENT# d . addCallback ( return_true ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# d . addCallback ( result . _emptyBucketCallbackRepeat , bucket ) #NEWLINE# #UNINDENT# return d