]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/s3roundtrip.py: do not use cStringIO
authorKefu Chai <kchai@redhat.com>
Fri, 27 Mar 2020 04:06:51 +0000 (12:06 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Jun 2020 02:32:23 +0000 (10:32 +0800)
cStringIO is not offered by python3, so avoid using using this module.

this file does not exist in master anymore, so this change is not
cherry-picked from master.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/s3roundtrip.py

index ca3fb72e541f63a3c78b6311939eb6d39604ba4a..ebaeb4bc6e6278f0f6719440151fb8320bf6e3ec 100644 (file)
@@ -1,7 +1,6 @@
 """
 Run rgw roundtrip message tests
 """
-from cStringIO import StringIO
 import base64
 import contextlib
 import logging
@@ -174,17 +173,14 @@ def configure(ctx, config):
                 './bootstrap',
                 ],
             )
-        conf_fp = StringIO()
         conf = dict(
                         s3=s3tests_conf['s3'],
                         roundtrip=s3tests_conf['roundtrip'],
                     )
-        yaml.safe_dump(conf, conf_fp, default_flow_style=False)
         teuthology.write_file(
             remote=remote,
             path='{tdir}/archive/s3roundtrip.{client}.config.yaml'.format(tdir=testdir, client=client),
-            data=conf_fp.getvalue(),
-            )
+            data=yaml.safe_dump(conf, default_flow_style=False))
     yield