summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/podcmd.py
diff options
context:
space:
mode:
authorNitin Goyal <nigoyal@redhat.com>2019-04-15 16:19:16 +0530
committerNitin Goyal <nigoyal@redhat.com>2019-04-15 16:40:21 +0000
commit21cba48297103a528edbc21ce04ee254d83bf151 (patch)
treeb9ed99b6e327ceaee946ff59c0c0f6f6e0bd3ac9 /openshift-storage-libs/openshiftstoragelibs/podcmd.py
parenta06a47467e3c7ad69e49ab4a27980af3494ee64e (diff)
Use py2/3 compatible string type checks
Replace usage of "types.StringTypes" with "six.string_types", because the latter one is compatible with both - py2 and py3. Change-Id: Ie8f9495914fca527da086af0915130470e3fd3e0
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/podcmd.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/podcmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/podcmd.py b/openshift-storage-libs/openshiftstoragelibs/podcmd.py
index bf84a8b..1787bf3 100644
--- a/openshift-storage-libs/openshiftstoragelibs/podcmd.py
+++ b/openshift-storage-libs/openshiftstoragelibs/podcmd.py
@@ -47,9 +47,9 @@ lifetime of a function that addresses both hosts and pods.
from collections import namedtuple
from functools import partial, wraps
-import types
from glusto.core import Glusto as g
+import six
from openshiftstoragelibs import openshift_ops
@@ -95,7 +95,7 @@ def run(target, command, log_level=None, orig_run=g.run):
if isinstance(target, Pod):
prefix = ['oc', 'rsh', target.podname]
- if isinstance(command, types.StringTypes):
+ if isinstance(command, six.string_types):
cmd = ' '.join(prefix + [command])
else:
cmd = prefix + command