提交 2066b9d8 编写于 作者: L ltx 提交者: Gitee

user job.log if test.log not exists

上级 bc381590
......@@ -128,6 +128,8 @@ def get_attachment(host, id, job):
def get_log(host, id, job, name):
dir_job = os.path.join(dir_results, host, id, job)
logpath = os.path.join(dir_job, name + '.log')
if not os.path.exists(logpath):
logpath = os.path.join(dir_job, 'job.log')
try:
with open(logpath, 'r') as f:
log = f.read().split('\n')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册