提交 4d91a8dc 编写于 作者: qq_22305325's avatar qq_22305325

update copy_proto_python_file.py


Former-commit-id: 8d25b989736a7a93a37092b97b96f12c10b8adfa
上级 3c08f089
......@@ -21,13 +21,14 @@ def copy_proto_files(src_proto_files, of_proto_python_dir, dst_proto_python_dir)
if not os.path.exists(dst_file_dir):
if dst_file_dir:
os.makedirs(dst_file_dir)
# use parameter exist_ok to avoid misjudgment under multithreading
os.makedirs(dst_file_dir, exist_ok=True)
if not os.path.exists(dst_file):
if (
not os.path.exists(dst_file)
or os.stat(src_file).st_mtime - os.stat(dst_file).st_mtime > 0
):
copyfile(src_file, dst_file)
else:
if os.stat(src_file).st_mtime - os.stat(dst_file).st_mtime > 0:
copyfile(src_file, dst_file)
def main():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册