mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -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
|
@ -20,6 +20,7 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from jinja2.exceptions import UndefinedError
|
||||
from six import text_type
|
||||
|
||||
from ansible.errors import *
|
||||
from ansible.playbook.attribute import FieldAttribute
|
||||
|
@ -82,7 +83,7 @@ class Conditional:
|
|||
if conditional is None or conditional == '':
|
||||
return True
|
||||
|
||||
if conditional in all_vars and '-' not in unicode(all_vars[conditional]):
|
||||
if conditional in all_vars and '-' not in text_type(all_vars[conditional]):
|
||||
conditional = all_vars[conditional]
|
||||
|
||||
# make sure the templar is using the variables specifed to this method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue