From 91e25bb9370f710c1f8ac831105af1fff56d4e6b Mon Sep 17 00:00:00 2001 From: Daniel Orbach Date: Wed, 9 Aug 2017 15:23:54 +0200 Subject: [PATCH] Tools: autotest.py: Made use of shutil.copy2() where appropiate. --- Tools/autotest/autotest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index 63912d0723..b3a954b280 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -70,8 +70,8 @@ def build_binaries(): # copy the script as it changes git branch, which can change the script while running orig = util.reltopdir('Tools/scripts/build_binaries.sh') copy = util.reltopdir('./build_binaries.sh') - shutil.copyfile(orig, copy) - shutil.copymode(orig, copy) + shutil.copy2(orig, copy) + if util.run_cmd(copy, directory=util.reltopdir('.')) != 0: print("Failed build_binaries.sh") return False @@ -84,8 +84,8 @@ def build_devrelease(): # copy the script as it changes git branch, which can change the script while running orig = util.reltopdir('Tools/scripts/build_devrelease.sh') copy = util.reltopdir('./build_devrelease.sh') - shutil.copyfile(orig, copy) - shutil.copymode(orig, copy) + shutil.copy2(orig, copy) + if util.run_cmd(copy, directory=util.reltopdir('.')) != 0: print("Failed build_devrelease.sh") return False