diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-12-13 21:53:57 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bmekala@redhat.com> | 2019-12-18 10:14:13 +0000 |
commit | e25ca323395f20232ca2e54ea6c966f91ea54e7e (patch) | |
tree | 0bea1bf19f6b54b6860593cdeab209c5178dc480 /glustolibs-gluster | |
parent | bdc29bccfda390fd3cc2953b43a8653f7653c56f (diff) |
[py2to3] Add py3 support in 'glusterdir.py' and 'ssl_ops.py' libraries
Change-Id: Ifad7d7f8e2e97bf327483b90dbf5a1cb855bc0dd
Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'glustolibs-gluster')
-rw-r--r-- | glustolibs-gluster/glustolibs/gluster/glusterdir.py | 2 | ||||
-rw-r--r-- | glustolibs-gluster/glustolibs/gluster/ssl_ops.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/glusterdir.py b/glustolibs-gluster/glustolibs/gluster/glusterdir.py index f1d882607..f2981cb93 100644 --- a/glustolibs-gluster/glustolibs/gluster/glusterdir.py +++ b/glustolibs-gluster/glustolibs/gluster/glusterdir.py @@ -96,7 +96,7 @@ def get_dir_contents(host, path): ret, out, _ = g.run(host, ' ls '+path) if ret != 0: return None - file_dir_list = filter(None, out.split("\n")) + file_dir_list = list(filter(None, out.split("\n"))) return file_dir_list diff --git a/glustolibs-gluster/glustolibs/gluster/ssl_ops.py b/glustolibs-gluster/glustolibs/gluster/ssl_ops.py index 9ce7c08a5..f5d310d01 100644 --- a/glustolibs-gluster/glustolibs/gluster/ssl_ops.py +++ b/glustolibs-gluster/glustolibs/gluster/ssl_ops.py @@ -20,7 +20,8 @@ validating basic ssl cases """ -from StringIO import StringIO +from io import StringIO + from glusto.core import Glusto as g |