#NEWLINE# def insert_repo( self ) : #NEWLINE# #INDENT# cursor = self . cnx . cursor ( ) #NEWLINE# query = ( ( 'INSERT IGNORE INTO ' + self . db_name ) + '.repository VALUES (%s, %s)' ) #NEWLINE# arguments = [ None , self . db_name ] #NEWLINE# cursor . execute ( query , arguments ) #NEWLINE# self . cnx . commit ( ) #NEWLINE# query = ( ( 'SELECT id FROM ' + self . db_name ) + '.repository WHERE name = %s' ) #NEWLINE# arguments = [ self . db_name ] #NEWLINE# cursor . execute ( self , arguments ) #NEWLINE# id = cursor . fetchone ( ) [ 0 ] #NEWLINE# cursor . close ( ) #NEWLINE# return id