Commit 2fa437de authored by Wallen姚文辉's avatar Wallen姚文辉

增加差异文件接口异常返回

parent 834651de
......@@ -23,6 +23,7 @@ lajiluoji={
def getFileCover(key,a1,a2,a3):
res=requests.post(diff_path+'/get_gitcode',json={'input1':a1,'input2':a2,'input3':a3}).json()["data"]["result"]
print(res)
data=[]
for key_,value in res.items():
data.append({"path":key_.replace(lajiluoji[a3],''),"change_fun":value,"cover_function": 0,
......@@ -78,10 +79,10 @@ def find_():
info=db.session.query(CodeCoverLog).filter(CodeCoverLog.user_id==session.get('id'),CodeCoverLog.product_key==key).first()
db.session.close()
data=getFileCover(key,info.commit_source,info.commit_target,info.product)
# try:
# data=getFileCover(key,info.commit_source,info.commit_target,info.product)
# except:
# return jsonify({"code": 500, "message": "获取差异文件接口异常"}), 500
try:
data=getFileCover(key,info.commit_source,info.commit_target,info.product)
except:
return jsonify({"code": 500, "message": "获取差异文件接口异常"}), 500
res = requests.get(
"https://test-code-coverage.galaxy-immi.com/" + key + "/" + path + "/index.html"
)
......
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