mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -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
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue