提交 9cbc590a 编写于 作者: F FondMemoryVVV

Modify the format

Signed-off-by: NFondMemoryVVV <mashuai53@huawei.com>
上级 5a7206f2
......@@ -26,7 +26,6 @@
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "signal.h"
#include "gtest/gtest.h"
#include "runtest.h"
......
......@@ -29,13 +29,17 @@ def copyFiles(sourceDir, targetDir):
for f in os.listdir(sourceDir):
sourceF = os.path.join(sourceDir, f)
targetF = os.path.join(targetDir, f)
if os.path.isfile(sourceF):
if not os.path.exists(targetDir):
if not os.path.isfile(sourceF):
if os.path.isdir(sourceF):
copyFiles(sourceF, targetF)
elif os.path.isfile(sourceF):
if os.path.exists(targetDir):
copyFileCounts += 1
open(targetF, "wb").write(open(sourceF, "rb").read())
elif not os.path.exists(targetDir):
os.makedirs(targetDir)
copyFileCounts += 1
open(targetF, "wb").write(open(sourceF, "rb").read())
if os.path.isdir(sourceF):
copyFiles(sourceF, targetF)
copyFileCounts += 1
open(targetF, "wb").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.
先完成此消息的编辑!
想要评论请 注册