Commit 9a128731 by Michael DeHaan

Merge pull request #1477 from skvidal/devel

add check that vars plugins are not handing back None
parents 08cc961d 7c1e0de1
......@@ -282,7 +282,8 @@ class Inventory(object):
vars = {}
for ip in self._vars_plugins:
updated = ip.run(host)
vars.update(updated)
if updated is not None:
vars.update(updated)
if self._is_script:
cmd = subprocess.Popen(
......
......@@ -440,13 +440,9 @@ 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):
found = True
found = False
else:
found = True
if not found:
res['results'].append('%s is not installed' % spec)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment