iam_server_certificate_facts: change `except` to python 2.6 syntax

reviewable/pr18780/r1
Allen Sanabria 9 years ago committed by Ryan S. Brown
parent c574dbee54
commit 4615a6cc76

@ -26,11 +26,12 @@ requirements: [boto3, botocore]
options:
name:
description:
- The name of the server certificate you are retrieveing attributes for.
- The name of the server certificate you are retrieving attributes for.
required: true
extends_documentation_fragment:
- aws
- ec2
requirements: ['boto3']
'''
EXAMPLES = '''
@ -83,6 +84,8 @@ upload_date:
type: str
sample: "2015-04-25T00:36:40+00:00"
'''
try:
import boto3
import botocore.exceptions
@ -149,8 +152,9 @@ def main():
try:
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
iam = boto3_conn(module, conn_type='client', resource='iam', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except botocore.exceptions.ClientError, e:
except botocore.exceptions.ClientError as e:
module.fail_json(msg="Boto3 Client Error - " + str(e.msg))
cert_name = module.params.get('name')
results = get_server_cert(iam, cert_name)
module.exit_json(results=results)

Loading…
Cancel
Save