#NEWLINE# def disconnect_user( self , credential ) : #NEWLINE# #INDENT# r = self . __query ( ( "SELECT id FROM information_schema.processlist WHERE user='%s' AND db='%s'" % ( credential . user , credential . database ) ) ) #NEWLINE# for session in r : #NEWLINE# #INDENT# LOG . info ( ( 'disconnecting user %s from database %s id_session %s' % ( credential . user , credential . database , session [ 'id' ] ) ) ) #NEWLINE# self . __query ( ( 'KILL CONNECTION %s' % session [ 'id' ] ) )