Merge pull request #1477 from skvidal/devel

add check that vars plugins are not handing back None
This commit is contained in:
Michael DeHaan 2012-10-29 16:02:26 -07:00
commit 9a12873166
2 changed files with 5 additions and 8 deletions

View file

@ -282,6 +282,7 @@ class Inventory(object):
vars = {}
for ip in self._vars_plugins:
updated = ip.run(host)
if updated is not None:
vars.update(updated)
if self._is_script:

View file

@ -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: