code: def _conn(queue):
      '''
      Return an sqlite connection
      '''
      queue_dir = __opts__['sqlite_queue_dir']
      db = os.path.join(queue_dir, '{0}.db'.format(queue))
      log.debug('Connecting to: %s', db)
  
      con = sqlite3.connect(db)
      tables = _list_tables(con)
      if queue not in tables:
          _create_table(con, queue)
      return cof _conn(queue):
      '''
      Return an sqlite connection
      '''
      queue_dir = __opts__['sqlite_queue_dir']
      db = os.path.join(queue_dir, '{0}.db'.format(queue))
      log.debug('Connecting to: %s', db)
  
      con = sqlite3.connect(db)
      tables = _list_tables(con)
      if queue not in tables:
          _create_table(con, queue)
      return con
docs: Return an sqlite connection