[ovs-dev,19/55] python: Drop use of types.StringTypes.
diff mbox

Message ID 1450730875-18083-20-git-send-email-russell@ovn.org
State Deferred
Headers show

Commit Message

Russell Bryant Dec. 21, 2015, 8:47 p.m. UTC
types.StringTypes does not exist in Python 3.  We can use
six.string_types, instead.

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 python/ovs/unixctl/__init__.py | 4 +++-
 python/ovs/unixctl/client.py   | 5 +++--
 python/ovs/unixctl/server.py   | 3 +--
 3 files changed, 7 insertions(+), 5 deletions(-)

Patch
diff mbox

diff --git a/python/ovs/unixctl/__init__.py b/python/ovs/unixctl/__init__.py
index c6484c4..26e126a 100644
--- a/python/ovs/unixctl/__init__.py
+++ b/python/ovs/unixctl/__init__.py
@@ -14,10 +14,12 @@ 
 
 import types
 
+import six
+
 import ovs.util
 
 commands = {}
-strtypes = types.StringTypes
+strtypes = six.string_types
 
 
 class _UnixctlCommand(object):
diff --git a/python/ovs/unixctl/client.py b/python/ovs/unixctl/client.py
index be6dee4..1b247c4 100644
--- a/python/ovs/unixctl/client.py
+++ b/python/ovs/unixctl/client.py
@@ -13,7 +13,8 @@ 
 # limitations under the License.
 
 import os
-import types
+
+import six
 
 import ovs.jsonrpc
 import ovs.stream
@@ -21,7 +22,7 @@  import ovs.util
 
 
 vlog = ovs.vlog.Vlog("unixctl_client")
-strtypes = types.StringTypes
+strtypes = six.string_types
 
 
 class UnixctlClient(object):
diff --git a/python/ovs/unixctl/server.py b/python/ovs/unixctl/server.py
index 4ea19a1..cc712bf 100644
--- a/python/ovs/unixctl/server.py
+++ b/python/ovs/unixctl/server.py
@@ -15,7 +15,6 @@ 
 import copy
 import errno
 import os
-import types
 
 import six
 from six.moves import range
@@ -30,7 +29,7 @@  import ovs.vlog
 
 Message = ovs.jsonrpc.Message
 vlog = ovs.vlog.Vlog("unixctl_server")
-strtypes = types.StringTypes
+strtypes = six.string_types
 
 
 class UnixctlConnection(object):