#NEWLINE# def delete( self , * args , **kwargs ) : #NEWLINE# #INDENT# if self . is_in_quarantine : #NEWLINE# #INDENT# LOG . warning ( ( 'Database %s is in quarantine and will be removed' % kwargs . name ) ) #NEWLINE# for credential in self . credentials . all ( ) : #NEWLINE# #INDENT# instance = factory_for ( self . databaseinfra ) #NEWLINE# instance . remove_user ( credential ) #NEWLINE# #UNINDENT# super ( Database , self ) . delete ( * args , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . warning ( ( 'Putting database %s in quarantine' % self . name ) ) #NEWLINE# self . is_in_quarantine = True #NEWLINE# self . save ( ) #NEWLINE# if self . credentials . exists ( ) : #NEWLINE# #INDENT# for credential in self . credentials . all ( ) : #NEWLINE# #INDENT# new_password = make_db_random_password ( ) #NEWLINE# new_credential = Credential . objects . get ( pk = credential . id ) #NEWLINE# new_credential . password = new_password #NEWLINE# new_credential . save ( ) #NEWLINE# instance = factory_for ( self . databaseinfra ) #NEWLINE# instance . update_user ( new_credential )