2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

Remove dependency on python3-six

Since Python 2 support was removed in 1ca0323e7c ("Require Python 3 and
remove support for Python 2."), python3-six is not needed anymore.

Moreover python3-six is not available on RHEL/CentOS7 without using EPEL
and so this patch is needed in order to release OVS 2.13 on RHEL7.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Timothy Redaelli
2019-12-20 18:35:08 +01:00
committed by Ben Pfaff
parent 24e6970809
commit 0c4d144a98
38 changed files with 181 additions and 287 deletions

View File

@@ -21,8 +21,6 @@ import ovs.poller
import ovs.socket_util
import ovs.vlog
import six
try:
from OpenSSL import SSL
except ImportError:
@@ -86,7 +84,7 @@ class Stream(object):
@staticmethod
def _find_method(name):
for method, cls in six.iteritems(Stream._SOCKET_METHODS):
for method, cls in Stream._SOCKET_METHODS.items():
if name.startswith(method):
return cls
return None
@@ -401,7 +399,7 @@ class Stream(object):
return 0
# We must have bytes for sending.
if isinstance(buf, six.text_type):
if isinstance(buf, str):
buf = buf.encode('utf-8')
if sys.platform == 'win32' and self.socket is None: