def db_drop():
 logger.info('dropping capublic...')
 try:
  connection = MySQLdb.connect(user=MYSQL_USER, passwd=MYSQL_PASSWORD, db='capublic')
 except _mysql_exceptions.OperationalError:
  logger.info('...no such database. Bailing.')
  return
 connection.autocommit(True)
 cursor = connection.cursor()
 cursor.execute('DROP DATABASE IF EXISTS capublic;')
 connection.close()
 logger.info('...done.')

def db_drop ( ) : logger . info ( 'dropping capublic...' ) try : connection = MySQLdb . connect ( user = MYSQL_USER , passwd = MYSQL_PASSWORD , db = 'capublic' ) except _mysql_exceptions . OperationalError : logger . info ( '...no such database. Bailing.' ) return connection . autocommit ( True ) cursor = connection . cursor ( ) cursor . execute ( 'DROP DATABASE IF EXISTS capublic;' ) connection . close ( ) logger . info ( '...done.' )
drop the old database .