Remove extra parameter in format_exc (#46251)

`traceback.format_exc()` does not take any argument, this fix remove
such occurances.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/47342/head
Abhijeet Kasurde 6 years ago committed by ansibot
parent 1a51b08875
commit bfc3ca1da1

@ -992,7 +992,7 @@ class AzureRMAuth(object):
try: try:
self._cloud_environment = azure_cloud.get_cloud_from_metadata_endpoint(raw_cloud_env) self._cloud_environment = azure_cloud.get_cloud_from_metadata_endpoint(raw_cloud_env)
except Exception as e: except Exception as e:
self.fail("cloud_environment {0} could not be resolved: {1}".format(raw_cloud_env, e.message), exception=traceback.format_exc(e)) self.fail("cloud_environment {0} could not be resolved: {1}".format(raw_cloud_env, e.message), exception=traceback.format_exc())
if self.credentials.get('subscription_id', None) is None and self.credentials.get('credentials') is None: if self.credentials.get('subscription_id', None) is None and self.credentials.get('credentials') is None:
self.fail("Credentials did not include a subscription_id value.") self.fail("Credentials did not include a subscription_id value.")

@ -459,7 +459,7 @@ def main():
module.fail_json(msg='boto3 connection does not have tag_resource(), likely due to using an old version') module.fail_json(msg='boto3 connection does not have tag_resource(), likely due to using an old version')
boto3_sts = boto3_conn(module, conn_type='client', resource='sts', region=region, endpoint=ec2_url, **aws_connect_kwargs) boto3_sts = boto3_conn(module, conn_type='client', resource='sts', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except botocore.exceptions.NoCredentialsError as e: 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())
else: else:
boto3_dynamodb = None boto3_dynamodb = None
boto3_sts = None boto3_sts = None

@ -237,7 +237,7 @@ def main():
exception=traceback.format_exc()) exception=traceback.format_exc())
except botocore.exceptions.ParamValidationError as ve: except botocore.exceptions.ParamValidationError as ve:
module.fail_json(msg="Parameters to `invoke` failed to validate", module.fail_json(msg="Parameters to `invoke` failed to validate",
exception=traceback.format_exc(ve)) exception=traceback.format_exc())
except Exception as e: except Exception as e:
module.fail_json(msg="Unexpected failure while invoking Lambda function", module.fail_json(msg="Unexpected failure while invoking Lambda function",
exception=traceback.format_exc()) exception=traceback.format_exc())

Loading…
Cancel
Save