[modules] Fix bad usages of traceback.format_exc(); doesn't take an error parameter (#21678)

This commit is contained in:
Sloane Hertel 2017-02-20 13:27:39 -05:00 committed by Ryan Brown
commit 26b10eb160
11 changed files with 50 additions and 50 deletions

View file

@ -264,7 +264,7 @@ def main():
kms = ansible.module_utils.ec2.boto3_conn(module, conn_type='client', resource='kms', region=region, endpoint=ec2_url, **aws_connect_kwargs)
iam = ansible.module_utils.ec2.boto3_conn(module, conn_type='client', resource='iam', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except botocore.exceptions.NoCredentialsError as e:
module.fail_json(msg='cannot connect to AWS', exception=traceback.format_exc(e))
module.fail_json(msg='cannot connect to AWS', exception=traceback.format_exc())
try:
@ -289,7 +289,7 @@ def main():
except Exception as err:
error_msg = boto_exception(err)
module.fail_json(msg=error_msg, exception=traceback.format_exc(err))
module.fail_json(msg=error_msg, exception=traceback.format_exc())
module.exit_json(**result)