apt: fixed duplicate fail_json

This commit is contained in:
Rene Moser 2013-09-17 15:05:20 +02:00
parent a563ea1340
commit 9449d62fb2

View file

@ -285,7 +285,6 @@ def upgrade(m, mode="yes", force=False):
rc, out, err = m.run_command(cmd) rc, out, err = m.run_command(cmd)
if rc: if rc:
m.fail_json(msg="'%s %s' failed: %s" % (apt_cmd, upgrade_command, err)) m.fail_json(msg="'%s %s' failed: %s" % (apt_cmd, upgrade_command, err))
m.fail_json(msg="'aptitude safe-upgrade' failed: %s" % err)
if (apt_cmd == APT_GET_CMD and APT_GET_ZERO in out) or (apt_cmd == APTITUDE_CMD and APTITUDE_ZERO in out): if (apt_cmd == APT_GET_CMD and APT_GET_ZERO in out) or (apt_cmd == APTITUDE_CMD and APTITUDE_ZERO in out):
m.exit_json(changed=False, msg=out) m.exit_json(changed=False, msg=out)
m.exit_json(changed=True, msg=out) m.exit_json(changed=True, msg=out)