python: Drop use of types.StringTypes.
authorRussell Bryant <russell@ovn.org>
Mon, 14 Dec 2015 22:21:26 +0000 (17:21 -0500)
committerRussell Bryant <russell@ovn.org>
Tue, 2 Feb 2016 21:41:01 +0000 (16:41 -0500)
types.StringTypes does not exist in Python 3.  We can use
six.string_types, instead.

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
python/ovs/unixctl/__init__.py
python/ovs/unixctl/client.py
python/ovs/unixctl/server.py

index c6484c4..26e126a 100644 (file)
 
 import types
 
+import six
+
 import ovs.util
 
 commands = {}
-strtypes = types.StringTypes
+strtypes = six.string_types
 
 
 class _UnixctlCommand(object):
index be6dee4..1b247c4 100644 (file)
@@ -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):
index 4ea19a1..cc712bf 100644 (file)
@@ -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):