From 411adff00687842dd1c379fd78b6b2562c6f97e4 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 4 Sep 2015 08:52:34 -0700 Subject: Use exit_json in the latest yum subcommand instead of returning the result. Returning the resut is what we do in devel but the 1.9.x code isn't able to handle that properly yet. --- packaging/os/yum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/os/yum.py b/packaging/os/yum.py index 1337abf8..d780326e 100644 --- a/packaging/os/yum.py +++ b/packaging/os/yum.py @@ -733,7 +733,7 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos): rc, out, err = module.run_command(yum_basecmd + ['check-update']) if rc == 0 and update_all: res['results'].append('Nothing to do here, all packages are up to date') - return res + module.exit_json(**res) elif rc == 100: available_updates = out.split('\n') # build update dictionary @@ -813,7 +813,7 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos): if len(will_update) > 0 or len(pkgs['install']) > 0: res['changed'] = True - return res + module.exit_json(**res) # run commands if cmd: # update all -- cgit v1.2.1