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

@ -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] = ''