Merge pull request #1477 from skvidal/devel
add check that vars plugins are not handing back None
This commit is contained in:
commit
9a12873166
2 changed files with 5 additions and 8 deletions
|
@ -282,7 +282,8 @@ class Inventory(object):
|
||||||
vars = {}
|
vars = {}
|
||||||
for ip in self._vars_plugins:
|
for ip in self._vars_plugins:
|
||||||
updated = ip.run(host)
|
updated = ip.run(host)
|
||||||
vars.update(updated)
|
if updated is not None:
|
||||||
|
vars.update(updated)
|
||||||
|
|
||||||
if self._is_script:
|
if self._is_script:
|
||||||
cmd = subprocess.Popen(
|
cmd = subprocess.Popen(
|
||||||
|
|
10
library/yum
10
library/yum
|
@ -440,13 +440,9 @@ 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
|
found = False
|
||||||
module.exit_json(**res)
|
else:
|
||||||
|
found = True
|
||||||
found = False
|
|
||||||
for this in pkglist:
|
|
||||||
if is_installed(module, repoq, this, conf_file, en_repos=en_repos, dis_repos=dis_repos):
|
|
||||||
found = True
|
|
||||||
|
|
||||||
if not found:
|
if not found:
|
||||||
res['results'].append('%s is not installed' % spec)
|
res['results'].append('%s is not installed' % spec)
|
||||||
|
|
Loading…
Reference in a new issue