diff options
author | Sloane Hertel <shertel@redhat.com> | 2017-09-26 16:09:25 -0400 |
---|---|---|
committer | Ryan Brown <sb@ryansb.com> | 2017-09-26 16:09:25 -0400 |
commit | 91341de22078d64a66a33fec89a5a2e665d5228b (patch) | |
tree | 8d2e044207dfadfb97a68cbdd0e7758049811b4c /lib | |
parent | d532ab05ab8e8da3a598a385100852e491e98f07 (diff) | |
download | ansible-91341de22078d64a66a33fec89a5a2e665d5228b.tar.gz |
[cloudwatch_event] Due to an ImportError botocore is never successfully imported. (#30942)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py b/lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py index cc2ae97f37..24a063b31c 100644 --- a/lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py +++ b/lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py @@ -116,8 +116,7 @@ targets: ''' # NOQA try: - import boto3.exception - import botocore.exceptions + import botocore except ImportError: # module_utils.ec2.HAS_BOTO3 will do the right thing pass @@ -379,7 +378,7 @@ def get_cloudwatchevents_client(module): resource='events', region=region, endpoint=ec2_url, **aws_conn_kwargs) - except boto3.exception.NoAuthHandlerFound as e: + except botocore.exceptions.ProfileNotFound as e: module.fail_json(msg=str(e)) |