未验证 提交 55f35065 编写于 作者: O openharmony_ci 提交者: Gitee

!5747 fix tar_files.py for beta3

Merge pull request !5747 from FondMemoryVVV/toolchain
...@@ -30,14 +30,16 @@ def copyFiles(sourceDir, targetDir): ...@@ -30,14 +30,16 @@ def copyFiles(sourceDir, targetDir):
if not os.path.isfile(sourceF): if not os.path.isfile(sourceF):
if os.path.isdir(sourceF): if os.path.isdir(sourceF):
copyFiles(sourceF, targetF) copyFiles(sourceF, targetF)
elif os.path.isfile(sourceF): continue
if os.path.exists(targetDir): if os.path.exists(targetDir):
copyFileCounts += 1 copyFileCounts += 1
open(targetF, "wb").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): elif not os.path.exists(targetDir):
os.makedirs(targetDir) os.makedirs(targetDir)
copyFileCounts += 1 copyFileCounts += 1
open(targetF, "wb").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): def make_targz_one_by_one(output_filename, source_dir):
tar = tarfile.open(output_filename,"w") tar = tarfile.open(output_filename,"w")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册