From f051b47de88e617270d4351994a8f1badcadd79a Mon Sep 17 00:00:00 2001 From: Rachanaben Patel Date: Thu, 21 Nov 2019 21:06:32 -0800 Subject: [PATCH] [qa] fixing 'python -c' in tasks so it works for python 2 and python 3 both Signed-off-by: Rachanaben Patel --- qa/tasks/ceph_manager.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index f4cbbf6e08d2d..2341e1a44e609 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -41,11 +41,7 @@ def write_conf(ctx, conf_path=DEFAULT_CONF_PATH, cluster='ceph'): args=[ 'sudo', 'mkdir', '-p', '/etc/ceph', run.Raw('&&'), 'sudo', 'chmod', '0755', '/etc/ceph', run.Raw('&&'), - 'sudo', 'python', - '-c', - ('import shutil, sys; ' - 'shutil.copyfileobj(sys.stdin, file(sys.argv[1], "wb"))'), - conf_path, + "sudo", "sh", "-c", "cat > %s" % conf_path, run.Raw('&&'), 'sudo', 'chmod', '0644', conf_path, ], -- 2.39.5