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:
Marius Gedminas 2015-09-04 08:39:08 +03:00
parent 1840906f74
commit 37be9539ff
9 changed files with 20 additions and 14 deletions

View file

@ -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