From 3e7c30d4166a520f01ebb35e3751ab1cd63fdfdf Mon Sep 17 00:00:00 2001 From: Rachana Patel Date: Wed, 13 Nov 2019 00:22:45 -0500 Subject: [PATCH] using put_file method instead of python shutil.copyfileobj Signed-off-by: Rachana Patel --- teuthology/task/kernel.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 1ff1a3b010..b7dd7f64a2 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( -- 2.39.5