Ensure the return value for changed is bool (#2830)

fixes #2827
This commit is contained in:
Robin Roth 2016-09-02 08:08:08 +03:00 committed by Matt Clay
parent 70e8bb3092
commit fb49e0401e

View file

@ -427,7 +427,7 @@ def main():
elif state in ['installed', 'present', 'latest']: elif state in ['installed', 'present', 'latest']:
packages_changed, retvals = package_present(module, name, state == 'latest') packages_changed, retvals = package_present(module, name, state == 'latest')
retvals['changed'] = retvals['rc'] == 0 and packages_changed retvals['changed'] = retvals['rc'] == 0 and bool(packages_changed)
if module._diff: if module._diff:
set_diff(module, retvals, packages_changed) set_diff(module, retvals, packages_changed)