From 8e3e21973d63a1c399d0c3f537df9b255d76e7b2 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 19 Oct 2020 19:59:22 +0200 Subject: [PATCH] catch ImportError rather than Exception when testing Boto3 imports (#267) This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/e83d579f5667911a496275eae9c5c7b7da98391e --- plugins/modules/lambda_policy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/lambda_policy.py b/plugins/modules/lambda_policy.py index 2860e3a6540..2fb4b4ddead 100644 --- a/plugins/modules/lambda_policy.py +++ b/plugins/modules/lambda_policy.py @@ -139,7 +139,7 @@ try: from botocore.exceptions import ClientError -except Exception: +except ImportError: pass # caught by AnsibleAWSModule