summaryrefslogtreecommitdiffstats
path: root/contrib/inventory/vmware.py
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2015-09-04 07:39:08 +0200
committerMarius Gedminas <marius@gedmin.as>2015-09-04 07:40:10 +0200
commit37be9539ff3cbe983467bc1b88fab28f254ba6e3 (patch)
tree343ecb33030b15b84230abd01a92c95a1bac0adb /contrib/inventory/vmware.py
parentMerge pull request #12236 from amenonsen/ssh-cpdir (diff)
downloadansible-37be9539ff3cbe983467bc1b88fab28f254ba6e3.tar.xz
ansible-37be9539ff3cbe983467bc1b88fab28f254ba6e3.zip
Python 3: use six.text_type instead of unicode
Replace 'unicode' with six.text_type, everywhere but in module_utils.
Diffstat (limited to 'contrib/inventory/vmware.py')
-rwxr-xr-xcontrib/inventory/vmware.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/inventory/vmware.py b/contrib/inventory/vmware.py
index 4da5a636a9..8f723a638d 100755
--- a/contrib/inventory/vmware.py
+++ b/contrib/inventory/vmware.py
@@ -39,6 +39,8 @@ import sys
import time
import ConfigParser
+from six import text_type
+
# Disable logging message trigged by pSphere/suds.
try:
from logging import NullHandler
@@ -149,7 +151,7 @@ class VMwareInventory(object):
seen = seen or set()
if isinstance(obj, ManagedObject):
try:
- obj_unicode = unicode(getattr(obj, 'name'))
+ obj_unicode = text_type(getattr(obj, 'name'))
except AttributeError:
obj_unicode = ()
if obj in seen: