summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/openshift_ops.py4
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/podcmd.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
index 7e300645..57c4dee7 100644
--- a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
+++ b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py
@@ -11,11 +11,11 @@ except ImportError:
# py2
import json
import re
-import types
from glusto.core import Glusto as g
from glustolibs.gluster import volume_ops
import mock
+import six
import yaml
from openshiftstoragelibs import command
@@ -201,7 +201,7 @@ def oc_rsh(ocp_node, pod_name, command, log_level=None):
A tuple consisting of the command return code, stdout, and stderr.
"""
prefix = ['oc', 'rsh', pod_name]
- if isinstance(command, types.StringTypes):
+ if isinstance(command, six.string_types):
cmd = ' '.join(prefix + [command])
else:
cmd = prefix + command
diff --git a/openshift-storage-libs/openshiftstoragelibs/podcmd.py b/openshift-storage-libs/openshiftstoragelibs/podcmd.py
index bf84a8b9..1787bf3c 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