From: Kefu Chai Date: Sun, 5 Apr 2020 13:06:40 +0000 (+0800) Subject: teuthology: s/cStringIO.StringIO/six.StringIO/ X-Git-Tag: 1.1.0~132^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=141d7e504081e145c2b69200119961e25eea5316;p=teuthology.git teuthology: s/cStringIO.StringIO/six.StringIO/ to be py3 compatible. this addresses the failure of ``` 2020-04-05T12:35:02.036 INFO:teuthology.run_tasks:Running task ssh_keys... 2020-04-05T12:35:02.050 ERROR:teuthology.run_tasks:Saw exception from tasks. Traceback (most recent call last): File "/home/teuthworker/src/git.ceph.com_git_teuthology_py3/teuthology/run_tasks.py", line 86, in run_tasks manager = run_one_task(taskname, ctx=ctx, config=config) File "/home/teuthworker/src/git.ceph.com_git_teuthology_py3/teuthology/run_tasks.py", line 64, in run_one_task task = get_task(taskname) File "/home/teuthworker/src/git.ceph.com_git_teuthology_py3/teuthology/run_tasks.py", line 28, in get_task module = _import('tasks', module_name, task_name, fail_on_import_error=True) File "/home/teuthworker/src/git.ceph.com_git_teuthology_py3/teuthology/run_tasks.py", line 52, in _import 0, ImportError: No module named 'tasks.ssh_keys' ``` Signed-off-by: Kefu Chai --- diff --git a/teuthology/orchestra/test/integration/test_integration.py b/teuthology/orchestra/test/integration/test_integration.py index 804def3b6..9064341aa 100644 --- a/teuthology/orchestra/test/integration/test_integration.py +++ b/teuthology/orchestra/test/integration/test_integration.py @@ -1,7 +1,7 @@ from teuthology.orchestra import monkey monkey.patch_all() -from cStringIO import StringIO +from six import StringIO import os from teuthology.orchestra import connection, remote, run diff --git a/teuthology/task/hadoop.py b/teuthology/task/hadoop.py index 66949a3bb..20e1cd32e 100644 --- a/teuthology/task/hadoop.py +++ b/teuthology/task/hadoop.py @@ -1,4 +1,4 @@ -from cStringIO import StringIO +from six import StringIO import contextlib import logging from teuthology import misc as teuthology diff --git a/teuthology/task/ssh_keys.py b/teuthology/task/ssh_keys.py index ee49074d5..0b734db49 100644 --- a/teuthology/task/ssh_keys.py +++ b/teuthology/task/ssh_keys.py @@ -8,7 +8,7 @@ import paramiko import re from datetime import datetime -from cStringIO import StringIO +from six import StringIO from teuthology import contextutil import teuthology.misc as misc from teuthology.orchestra import run