@classmethod
    def conn(cls):
        """
        return the vertica connection handle to the configured server
        """
        config = cls.config
        try:
            conn_driver_dict = {}
            conf_to_driver_map = {'host':'host',
                                  'username':'user',
                                  'password':'password',
                                  'revision_db_name':'database',
                                  'port':'port'}
            for conf_key, conf_value in config.iteritems():
                try:
                    driver_key = conf_to_driver_map[conf_key]
                    driver_value = conf_value

                    # NOTE: Vertica Python driver requires non-unicode strings
                    if isinstance(driver_value, unicode):
                        driver_value = str(driver_value)

                    conn_driver_dict[driver_key] = driver_value

                except __HOLE__:
                    pass

            conn = vertica_python.connect(conn_driver_dict)
        except Exception, e:
            raise DbError("Cannot connect to Vertica Db: %s\n"
                          "Ensure that the server is running and you can connect normally"
                          % e.message)

        return conn
dataset/ETHPy150Open appnexus/schema-tool/schematool/db/_vertica.py/VerticaDb.conn