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] Display parameter name in string conversion warning #57145

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@samdoran
Copy link
Member

commented May 29, 2019

SUMMARY

Fixes #56788

Add parameter name to warning message when values in a string field are converted so it's more helpful.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/basic.py

ADDITIONAL INFORMATION

When no parameter is available, the current message will be displayed:

 [WARNING]: The value True (type bool) in a string parameter was converted to 'True' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

If the parameter name is passed to _check_type_str(), that will be displayed in the warning message:

 [WARNING]: The value True (type bool) in the string parameter "option" was converted to 'True' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

@samdoran samdoran changed the title [WIP] Display parameter name in warning when it is passed in [WIP] Display parameter name in string conversion warning May 29, 2019

@goneri goneri removed the needs_triage label May 30, 2019

@ansibot ansibot added the stale_ci label Jun 7, 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.