mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -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
|
@ -37,7 +37,7 @@ import re
|
|||
from time import time
|
||||
import ConfigParser
|
||||
|
||||
from six import iteritems
|
||||
from six import iteritems, string_types
|
||||
from libcloud.compute.types import Provider
|
||||
from libcloud.compute.providers import get_driver
|
||||
import libcloud.security as sec
|
||||
|
@ -262,7 +262,7 @@ class LibcloudInventory(object):
|
|||
# Handle complex types
|
||||
if type(value) in [int, bool]:
|
||||
instance_vars[key] = value
|
||||
elif type(value) in [str, unicode]:
|
||||
elif type(value) in string_types:
|
||||
instance_vars[key] = value.strip()
|
||||
elif type(value) == type(None):
|
||||
instance_vars[key] = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue