now actually import exception to be usable

This commit is contained in:
Brian Coca 2013-03-13 18:21:16 -04:00
parent 4a2276bb4b
commit 4f9c61d673

View file

@ -263,7 +263,7 @@ def main():
elif p['state'] in [ 'removed', 'absent' ]:
remove(module, packages, cache, p['purge'])
except LockFailedException:
except apt.cache.LockFailedException:
module.fail_json(msg="Failed to lock apt for exclusive operation")
# this is magic, see lib/ansible/module_common.py