From 4f9c61d6739e217ffdf2fc56b1697af144e8ebe8 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 13 Mar 2013 18:21:16 -0400 Subject: [PATCH] now actually import exception to be usable --- library/apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/apt b/library/apt index 73fa17e9702..5731d4f8e59 100644 --- a/library/apt +++ b/library/apt @@ -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