def _conn(queue):
    queue_dir = __opts__['sqlite_queue_dir']
    db = os.path.join(queue_dir, '{0}.db'.format(queue))
    log.debug('Connecting to:  {0}'.format(db))

    con = lite.connect(db)
    tables = _list_tables(con)
    if queue not in tables:
        _create_table(con, queue)
    return con
Return an sqlite connection
dataset/ETHPy150Open saltstack/salt/salt/queues/sqlite_queue.py/_conn