def list_(narrow=None,
          all_versions=False,
          pre_versions=False,
          source=None,
          local_only=False):
    choc_path = _find_chocolatey(__context__, __salt__)
    cmd = [choc_path, 'list']
    if narrow:
        cmd.append(narrow)
    if salt.utils.is_true(all_versions):
        cmd.append('-AllVersions')
    if salt.utils.is_true(pre_versions):
        cmd.append('-Prerelease')
    if source:
        cmd.extend(['-Source', source])
    if local_only:
        cmd.extend(['-localonly'])

    result = __salt__['cmd.run_all'](cmd, python_shell=False)

    if result['retcode'] != 0:
        err = 'Running chocolatey failed: {0}'.format(result['stderr'])
        log.error(err)
        raise CommandExecutionError(err)

    ret = {}
    pkg_re = re.compile(r'(\S+)\s+(\S+)')
    for line in result['stdout'].split('\n'):
        if line.startswith("No packages"):
            return ret
        for name, ver in pkg_re.findall(line):
            if name not in ret:
                ret[name] = []
            ret[name].append(ver)

    return ret
Instructs Chocolatey to pull a vague package list from the repository.
dataset/ETHPy150Open saltstack/salt/salt/modules/chocolatey.py/list_