]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephfs: use StringIO for capturing str
authorKefu Chai <kchai@redhat.com>
Sat, 28 Mar 2020 11:10:03 +0000 (19:10 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:53 +0000 (16:34 +0800)
if we don't expect non-utf8 in stdout, use StringIO instead of BytesIO.

see also d8d44ed1566b19eec055e07da2a0fed88fed4152

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f10f86579684a0d1b8d99787b8e19709a64df7d6)

qa/tasks/cephfs/mount.py

index 39c5add1363a5d828682a8d981e3218a61450506..421d0c5c73b443bd1f39dc0352fa243bf344d4d7 100644 (file)
@@ -4,6 +4,7 @@ import logging
 import datetime
 import six
 import time
+from six import StringIO
 from textwrap import dedent
 import os
 from teuthology.orchestra import run
@@ -184,7 +185,7 @@ class CephFSMount(object):
         return self.client_remote.run(
                args=['sudo', 'adjust-ulimits', 'daemon-helper', 'kill',
                      py_version, '-c', pyscript], wait=False, stdin=run.PIPE,
-               stdout=BytesIO())
+               stdout=StringIO())
 
     def run_python(self, pyscript, py_version='python3'):
         p = self._run_python(pyscript, py_version)