You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our common_koji.get_profile_name() method seems to duplicate Ansible's own env_fallback() method. Maybe we could use env_fallback and drop some code / get nicer error messages? Currently get_profile_name() raises ValueError if it can't find a profile. env_fallback() will raise AnsibleFallbackNotFound, so I guess that's a tiny bit easier to catch?
Our
common_koji.get_profile_name()
method seems to duplicate Ansible's own env_fallback() method. Maybe we could useenv_fallback
and drop some code / get nicer error messages? Currentlyget_profile_name()
raisesValueError
if it can't find a profile.env_fallback()
will raiseAnsibleFallbackNotFound
, so I guess that's a tiny bit easier to catch?From https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#fallback , it would look something like this:
Need to play around with this and see if it's viable and a net gain.
(Also, beware we have no integration tests for un-setting
KOJI_PROFILE
)The text was updated successfully, but these errors were encountered: