takes a connection and creates the connection

def set_conn(self, **kwargs):
        """ takes a connection and creates the connection """

        # log = logging.getLogger("%s.%s" % (self.log, inspect.stack()[0][3]))
        log.setLevel(kwargs.get('log_level',self.log_level))

        conn_name = kwargs.get("name")
        if not conn_name:
            raise NameError("a connection requires a 'name': %s" % kwargs)
        elif self.conns.get(conn_name):
            raise KeyError("connection '%s' has already been set" % conn_name)

        if not kwargs.get("active", True):
            log.warning("Connection '%s' is set as inactive" % conn_name)
            return
        conn_type = kwargs.get("conn_type")
        if not conn_type or conn_type not in self.conn_mapping.nested:
            err_msg = ["a connection requires a valid 'conn_type':\n",
                       "%s"]
            raise NameError("".join(err_msg) % (list(self.conn_mapping.nested)))
        log.info("Setting '%s' connection", conn_name)
        if conn_type == "triplestore":
            conn = make_tstore_conn(kwargs)
        else:
            conn = RdfwConnections[conn_type][kwargs['vendor']](**kwargs)
        self.conns[conn_name] = conn
        self.__is_initialized__ = True