提交 db05f5ac 编写于 作者: F FondMemoryVVV

fix tar_files.py

Signed-off-by: NFondMemoryVVV <mashuai53@huawei.com>
上级 0ef06196
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册