qa/tasks/qemu: get rid of cStringIO for py3

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
This commit is contained in:
Kyr Shatskyy 2020-02-21 19:45:58 +01:00
parent e7473b631d
commit 914c0816e6

View File

@ -1,7 +1,6 @@
"""
Qemu task
"""
from cStringIO import StringIO
import contextlib
import logging
@ -172,7 +171,7 @@ def generate_iso(ctx, config):
user_data = user_data.format(
ceph_branch=ctx.config.get('branch'),
ceph_sha1=ctx.config.get('sha1'))
teuthology.write_file(remote, userdata_path, StringIO(user_data))
teuthology.write_file(remote, userdata_path, user_data)
with open(os.path.join(src_dir, 'metadata.yaml'), 'rb') as f:
teuthology.write_file(remote, metadata_path, f)