diff options
author | Kyr Shatskyy <kyrylo.shatskyy@suse.com> | 2020-02-15 12:05:44 +0100 |
---|---|---|
committer | Kyr Shatskyy <kyrylo.shatskyy@suse.com> | 2020-03-06 10:19:55 +0100 |
commit | 683421ea24bbed4ba72ea96a9055134bed554696 (patch) | |
tree | ccfbfb7cd72588eadd0beabaaa05bb505050cb70 /qa/tasks/util | |
parent | qa/tasks/rgw_logsocket: get rid of cStringIO for py3 (diff) | |
download | ceph-683421ea24bbed4ba72ea96a9055134bed554696.tar.xz ceph-683421ea24bbed4ba72ea96a9055134bed554696.zip |
qa/tasks/util/rgw: get rid of cString for py3
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
Diffstat (limited to 'qa/tasks/util')
-rw-r--r-- | qa/tasks/util/rgw.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qa/tasks/util/rgw.py b/qa/tasks/util/rgw.py index 91652198b8a..06ab47b5a98 100644 --- a/qa/tasks/util/rgw.py +++ b/qa/tasks/util/rgw.py @@ -1,4 +1,4 @@ -from cStringIO import StringIO +from io import BytesIO import logging import json import time @@ -7,7 +7,7 @@ from teuthology import misc as teuthology log = logging.getLogger(__name__) -def rgwadmin(ctx, client, cmd, stdin=StringIO(), check_status=False, +def rgwadmin(ctx, client, cmd, stdin=BytesIO(), check_status=False, format='json', decode=True, log_level=logging.DEBUG): log.info('rgwadmin: {client} : {cmd}'.format(client=client,cmd=cmd)) testdir = teuthology.get_testdir(ctx) @@ -29,8 +29,8 @@ def rgwadmin(ctx, client, cmd, stdin=StringIO(), check_status=False, proc = remote.run( args=pre, check_status=check_status, - stdout=StringIO(), - stderr=StringIO(), + stdout=BytesIO(), + stderr=BytesIO(), stdin=stdin, ) r = proc.exitstatus @@ -81,9 +81,9 @@ def wait_for_radosgw(url, remote): proc = remote.run( args=curl_cmd, check_status=False, - stdout=StringIO(), - stderr=StringIO(), - stdin=StringIO(), + stdout=BytesIO(), + stderr=BytesIO(), + stdin=BytesIO(), ) exit_status = proc.exitstatus if exit_status == 0: |