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

@ -24,6 +24,7 @@ import json
import os
from yaml import load, YAMLError
from six import text_type
from ansible.errors import AnsibleParserError
from ansible.errors.yaml_strings import YAML_SYNTAX_ERROR
@ -80,7 +81,7 @@ class DataLoader():
# they are unable to cope with our subclass.
# Unwrap and re-wrap the unicode so we can keep track of line
# numbers
new_data = unicode(data)
new_data = text_type(data)
else:
new_data = data
try: