mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 08:24:02 -07:00
[modules] Fix bad usages of traceback.format_exc()
; doesn't take an error parameter (#21678)
This commit is contained in:
parent
d9e4248c35
commit
26b10eb160
11 changed files with 50 additions and 50 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue