1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #13257 from chrrrles/utf8

fixing error with using non-ascii values for ask-sudo-password
This commit is contained in:
Chrrrles Paul 2015-11-25 11:52:17 +09:00
commit 157230c3e8

View file

@ -36,6 +36,7 @@ from ansible.parsing.dataloader import DataLoader
from ansible.playbook.attribute import Attribute, FieldAttribute
from ansible.utils.boolean import boolean
from ansible.utils.vars import combine_vars, isidentifier
from ansible.utils.unicode import to_unicode
BASE_ATTRIBUTES = {}
@ -310,7 +311,7 @@ class Base:
# and make sure the attribute is of the type it should be
if value is not None:
if attribute.isa == 'string':
value = text_type(value)
value = text_type(to_unicode(value))
elif attribute.isa == 'int':
value = int(value)
elif attribute.isa == 'float':