-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ec2_snapshot_copy: WaitError and ClientError exception handling #38072
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s-hertel
approved these changes
Apr 2, 2018
@@ -143,7 +143,7 @@ def copy_snapshot(module, ec2): | |||
) | |||
|
|||
except WaiterError as we: | |||
module.fail_json(msg='An error occurred (%s) waiting for the snapshot to become available. (%s)' % (we.message, we.reason)) | |||
module.fail_json(msg='An error occurred waiting for the snapshot to become available. (%s)' % str(we), exception=traceback.format_exc()) | |||
except ClientError as ce: | |||
module.fail_json(msg=ce.message, exception=traceback.format_exc(), **camel_dict_to_snake_dict(ce.response)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this. Do you mind fixing this one as well? ce.message won't exist on python3.
module.fail_json(msg=str(ce), exception=traceback.format_exc(), **camel_dict_to_snake_dict(ce.response))
That's updated @s-hertel |
Merged, thanks @ZuZuD |
ryancurrah
pushed a commit
to ryancurrah/ansible
that referenced
this pull request
Apr 4, 2018
willthames
pushed a commit
that referenced
this pull request
Apr 6, 2018
ilicmilan
pushed a commit
to ilicmilan/ansible
that referenced
this pull request
Nov 7, 2018
ilicmilan
pushed a commit
to ilicmilan/ansible
that referenced
this pull request
Nov 7, 2018
…nsible#38243) * ec2_snapshot_copy: add wait_timeout parameter
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
aws
bug
This issue/PR relates to a bug.
cloud
community_review
In order to be merged, this PR must follow the community review workflow.
module
This issue/PR relates to a module.
new_contributor
This PR is the first contribution by a new community member.
support:community
This issue/PR relates to code supported by the Ansible community.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Fix issue #37834 - Error while raising WaitError exception in copy_snapshot() ('reason' is not a valid attribute)
ISSUE TYPE
COMPONENT NAME
ec2_snapshot_copy
ANSIBLE VERSION
ansible 2.4.2.0
ADDITIONAL INFORMATION