From: Rachana Patel Date: Wed, 13 Nov 2019 05:22:45 +0000 (-0500) Subject: using put_file method instead of python shutil.copyfileobj X-Git-Tag: 1.1.0~201^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1352%2Fhead;p=teuthology.git using put_file method instead of python shutil.copyfileobj Signed-off-by: Rachana Patel --- diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 1ff1a3b01..b7dd7f64a 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -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(