Commit d9040bd6 authored by jinkaiqiang's avatar jinkaiqiang

增加延迟

parent 16baba52
Pipeline #28945 passed with stage
in 21 seconds
......@@ -36,13 +36,13 @@ def readonly_handler(func, path, execinfo):
这里需要实现文件权限修改的回调函数,通过onerror带入。
'''
os.chmod(path, stat.S_IWRITE)
time.sleep(0.5)
func(path)
if os.path.exists(git_path):
if platform.system() == 'Linux':
os.system(f"rm -rf {deploy_repo_path}")
time.sleep(1)
else:
shutil.rmtree(git_path, onerror=readonly_handler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment