mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. * Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above. * Fixing compile time errors IRT error exception handling for Python 3.5. This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
This commit is contained in:
@@ -249,7 +249,7 @@ def main():
|
||||
iam = connect_to_aws(boto.iam, region, **aws_connect_kwargs)
|
||||
else:
|
||||
iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
|
||||
except boto.exception.NoAuthHandlerFound, e:
|
||||
except boto.exception.NoAuthHandlerFound as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
state = module.params.get('state')
|
||||
@@ -284,7 +284,7 @@ def main():
|
||||
try:
|
||||
cert_action(module, iam, name, path, new_name, new_path, state,
|
||||
cert, key, cert_chain, orig_certs, orig_bodies, dup_ok)
|
||||
except boto.exception.BotoServerError, err:
|
||||
except boto.exception.BotoServerError as err:
|
||||
module.fail_json(changed=changed, msg=str(err), debug=[cert,key])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user