From db05f5acbf0f98855a33b9548b1810c9085738fe Mon Sep 17 00:00:00 2001 From: FondMemoryVVV Date: Thu, 29 Sep 2022 09:54:08 +0800 Subject: [PATCH] fix tar_files.py Signed-off-by: FondMemoryVVV --- commonlibrary/toolchain/libc-test/tar_files.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commonlibrary/toolchain/libc-test/tar_files.py b/commonlibrary/toolchain/libc-test/tar_files.py index e5b0e69ad..356f7f2ee 100755 --- a/commonlibrary/toolchain/libc-test/tar_files.py +++ b/commonlibrary/toolchain/libc-test/tar_files.py @@ -33,13 +33,13 @@ def copyFiles(sourceDir, targetDir): continue if os.path.exists(targetDir): copyFileCounts += 1 - with open(targetF, "wb") as fp: - fp.write(open(sourceF, "rb").read()) + with open(targetF, "wb") as target_open: + target_open.write(open(sourceF, "rb").read()) elif not os.path.exists(targetDir): os.makedirs(targetDir) copyFileCounts += 1 - with open(targetF, "wb") as fp: - fp.write(open(sourceF, "rb").read()) + with open(targetF, "wb") as target_open: + target_open.write(open(sourceF, "rb").read()) def make_targz_one_by_one(output_filename, source_dir): tar = tarfile.open(output_filename,"w") -- GitLab