1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix removal case where first pkg in a list is not installed at all

and the next one gets ignored despite being installed.

also clean up unnecessary second check.
This commit is contained in:
Seth Vidal 2012-10-29 13:48:20 -04:00
parent 3fcc591f18
commit 7c1e0de141

View file

@ -440,12 +440,8 @@ def remove(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
else: else:
pkglist = is_installed(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos) pkglist = is_installed(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos)
if not pkglist: if not pkglist:
res['msg'] += "No Package matching '%s' found installed" % spec
module.exit_json(**res)
found = False found = False
for this in pkglist: else:
if is_installed(module, repoq, this, conf_file, en_repos=en_repos, dis_repos=dis_repos):
found = True found = True
if not found: if not found: