]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
[qa] fixing 'python -c' in tasks so it works for python 2 and python 3 both 31803/head
authorRachanaben Patel <racpatel@redhat.com>
Fri, 22 Nov 2019 05:06:32 +0000 (21:06 -0800)
committerRachanaben Patel <racpatel@redhat.com>
Fri, 22 Nov 2019 05:06:32 +0000 (21:06 -0800)
Signed-off-by: Rachanaben Patel <racpatel@redhat.com>
qa/tasks/ceph_manager.py

index f4cbbf6e08d2d94f2277304aeab4c3f49a8c4d09..2341e1a44e6093fe853862a61acb1dc1dc308587 100644 (file)
@@ -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,
         ],