Commit 2cf80244a9c99680d1d69c865c250a19423788c4

Authored by liujiqiang
1 parent cfa4f445

更新

commons/scripts/delReport.py
@@ -25,7 +25,7 @@ def delReport(path,delNum=5): @@ -25,7 +25,7 @@ def delReport(path,delNum=5):
25 file_list = file_list[:0-delNum] 25 file_list = file_list[:0-delNum]
26 # print("if file_lis --- ",file_list) 26 # print("if file_lis --- ",file_list)
27 for i in file_list: 27 for i in file_list:
28 - if os.path.isfile(project_path + "/report/" + i) and ".log" not in i: 28 + if os.path.isfile(project_path + "/report/" + i) and ".html" in i:
29 os.remove(project_path + "/report/" + i) 29 os.remove(project_path + "/report/" + i)
30 print(f"删除报告 {i} 成功") 30 print(f"删除报告 {i} 成功")
31 # 文件已删除 31 # 文件已删除
report/test.log
1 -[2021-07-21 10:44:41] [INFO] : 发送邮件  
2 -[2021-07-21 10:44:43] [INFO] : 邮件发送完毕 1 +[2021-07-21 10:47:31] [INFO] : 发送邮件
  2 +[2021-07-21 10:47:33] [INFO] : 邮件发送完毕