]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
using put_file method instead of python shutil.copyfileobj 1352/head
authorRachana Patel <racpatel@redhat.com>
Wed, 13 Nov 2019 05:22:45 +0000 (00:22 -0500)
committerRachana Patel <racpatel@redhat.com>
Wed, 13 Nov 2019 05:22:45 +0000 (00:22 -0500)
Signed-off-by: Rachana Patel <racpatel@redhat.com>
teuthology/task/kernel.py

index 1ff1a3b010f63004cf98713b584b3b0022a25c42..b7dd7f64a2d6322a3605034da57da5b3ff978f9e 100644 (file)
@@ -342,17 +342,7 @@ def download_kernel(ctx, config):
             # local package - src is path
             log.info('Copying kernel package {path} to {role}...'.format(
                 path=src, role=role))
-            f = open(src, 'r')
-            proc = role_remote.run(
-                args=[
-                    'python', '-c',
-                    'import shutil, sys; shutil.copyfileobj(sys.stdin, open(sys.argv[1], "wb"))',
-                    remote_pkg_path(role_remote),
-                    ],
-                wait=False,
-                stdin=f
-                )
-            procs[role_remote.name] = proc
+            role_remote.put_file(src,remote_pkg_path(role_remote))
         else:
             # gitbuilder package - src is sha1
             log.info('Downloading kernel {sha1} on {role}...'.format(