mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -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
|
@ -151,7 +151,7 @@ def create(module, connection, replication_id, cluster_id, name):
|
|||
response = {}
|
||||
changed = False
|
||||
else:
|
||||
module.fail_json(msg="Unable to create the snapshot.", exception=traceback.format_exc(e))
|
||||
module.fail_json(msg="Unable to create the snapshot.", exception=traceback.format_exc())
|
||||
return response, changed
|
||||
|
||||
def copy(module, connection, name, target, bucket):
|
||||
|
@ -162,7 +162,7 @@ def copy(module, connection, name, target, bucket):
|
|||
TargetBucket=bucket)
|
||||
changed = True
|
||||
except botocore.exceptions.ClientError as e:
|
||||
module.fail_json(msg="Unable to copy the snapshot.", exception=traceback.format_exc(e))
|
||||
module.fail_json(msg="Unable to copy the snapshot.", exception=traceback.format_exc())
|
||||
return response, changed
|
||||
|
||||
def delete(module, connection, name):
|
||||
|
@ -178,7 +178,7 @@ def delete(module, connection, name):
|
|||
module.fail_json(msg="Error: InvalidSnapshotState. The snapshot is not in an available state or failed state to allow deletion."
|
||||
"You may need to wait a few minutes.")
|
||||
else:
|
||||
module.fail_json(msg="Unable to delete the snapshot.", exception=traceback.format_exc(e))
|
||||
module.fail_json(msg="Unable to delete the snapshot.", exception=traceback.format_exc())
|
||||
return response, changed
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue