Skip to content
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

[WIP] Make get_bin_path() always raise an exception #56813

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@samdoran
Copy link
Member

commented May 22, 2019

SUMMARY

Change get_bin_path() to always raise an exception. This is more in line with how methods in Python behave rather than having a toggle to control whether or not an exception is raised.

get_bin_path() in AnsibleModule will retain the same interface for backwards compatibility.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/basic.py

Make get_bin_path always rais an exception
This makes it behave in a more idiomatic way
@bcoca
Copy link
Member

left a comment

we use this in several places directly, you should also change the rest of the callers

@samdoran

This comment has been minimized.

Copy link
Member Author

commented May 23, 2019

@bcoca Absolutely. I plan to do that shortly.

Change uses of get_bin_path
Catch and handle exception rather than using required param
@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.