mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Python 3: use six.text_type instead of unicode
Replace 'unicode' with six.text_type, everywhere but in module_utils.
This commit is contained in:
parent
1840906f74
commit
37be9539ff
9 changed files with 20 additions and 14 deletions
|
@ -27,7 +27,7 @@ from functools import partial
|
|||
from inspect import getmembers
|
||||
from io import FileIO
|
||||
|
||||
from six import iteritems, string_types
|
||||
from six import iteritems, string_types, text_type
|
||||
|
||||
from jinja2.exceptions import UndefinedError
|
||||
|
||||
|
@ -291,7 +291,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 = unicode(value)
|
||||
value = text_type(value)
|
||||
elif attribute.isa == 'int':
|
||||
value = int(value)
|
||||
elif attribute.isa == 'float':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue