Type checking on library/apt means the upgrade parameter is now properly True/False

This commit is contained in:
Michael DeHaan 2013-03-01 23:34:27 -05:00
parent 38bd17af22
commit 6ecdef6b88

View file

@ -241,9 +241,9 @@ def main():
force_yes = p['force'] force_yes = p['force']
if p['upgrade'] != 'no' and p['package'] is None: if p['upgrade'] and p['package'] is None:
upgrade(module, p['upgrade']) upgrade(module, p['upgrade'])
elif p['upgrade'] != 'no' and p['package'] != None: elif p['upgrade'] and p['package'] != None:
module.fail_json(msg="Upgrade should not be used in conjunction with other options.") module.fail_json(msg="Upgrade should not be used in conjunction with other options.")
packages = p['package'].split(',') packages = p['package'].split(',')