From: Kyr Shatskyy Date: Mon, 16 Dec 2019 01:46:13 +0000 (+0100) Subject: qa/tasks/cephfs/kernel_mount: get rid of StringIO.StringIO for py3 X-Git-Tag: v14.2.10~17^2~94 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3dad1ac5f2db97cc3445bdf14a80dbb3e11f7d21;p=ceph.git qa/tasks/cephfs/kernel_mount: get rid of StringIO.StringIO for py3 Signed-off-by: Kyr Shatskyy (cherry picked from commit 875b45f3c903781ba99dbd2fcf4d2fc89001c25b) Conflicts: qa/tasks/cephfs/kernel_mount.py: trivial resolution --- diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index c5f6dab8aed..a27293c6dc8 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -1,4 +1,3 @@ -from StringIO import StringIO import json import logging import time @@ -233,10 +232,10 @@ class KernelMount(CephFSMount): print(open(os.path.join("{debug_dir}", "{filename}")).read()) """).format(debug_dir=debug_dir, filename=filename) - p = self.client_remote.run(args=[ - 'sudo', 'python', '-c', pyscript - ], stdout=StringIO(), timeout=(5*60)) - return p.stdout.getvalue() + output = self.client_remote.sh([ + 'sudo', 'python3', '-c', pyscript + ], timeout=(5*60)) + return output def get_global_id(self): """