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.
reviewable/pr18780/r1
Seth Vidal 12 years ago
parent 2c4d559523
commit 9dd9db6296

6
yum

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

Loading…
Cancel
Save