-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use raise from in plugins #11095
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
Use raise from in plugins #11095
Conversation
bbf87de to
d9e88fd
Compare
russoz
left a comment
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.
Possibly not for this PR
| parser.read_file(StringIO(obj)) | ||
| except Exception as ex: | ||
| raise AnsibleFilterError(f"from_ini failed to parse given string: {ex}", orig_exc=ex) | ||
| raise AnsibleFilterError(f"from_ini failed to parse given string: {ex}", orig_exc=ex) from ex |
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.
I have not investigated the code for that exception but made we could get rid of:
| raise AnsibleFilterError(f"from_ini failed to parse given string: {ex}", orig_exc=ex) from ex | |
| raise AnsibleFilterError(f"from_ini failed to parse given string: {ex}") from ex |
(possibly in other locations as well)
Backport to stable-12: 💚 backport PR created✅ Backport PR branch: Backported as #11129 🤖 @patchback |
|
@russoz thanks for reviewing! |
* Use raise from. * Add changelog fragment. (cherry picked from commit 2b4333a)
…11129) Use raise from in plugins (#11095) * Use raise from. * Add changelog fragment. (cherry picked from commit 2b4333a) Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
Use
raise ... from ...in plugins.ISSUE TYPE
COMPONENT NAME
various plugins