Don't remove git repo if error occurred during clone.

Maybe it was already existing before. In this case, we lost all our repo.
parent 6cb10ed8
......@@ -40,8 +40,6 @@ def cloneRepo(data):
code = 1
except Exception as e:
json = safeResult(str(e))
if os.path.exists(workDir):
shutil.rmtree(workDir)
return jsonify(code=code, result=json)
def gitStatus(project):
......
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