Commit 990f6173 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

fix a bug with error retreiving

parent b5839538
...@@ -536,8 +536,11 @@ class Workflow(threading.Thread): ...@@ -536,8 +536,11 @@ class Workflow(threading.Thread):
error["title"] = lines[line_idx].rstrip() error["title"] = lines[line_idx].rstrip()
error["msg"] = list() error["msg"] = list()
error["traceback"] = list() error["traceback"] = list()
line_idx += 2 # skip : "Traceback (most recent call last):" # skip all lines before the traceback
# Traceback while not lines[line_idx].startswith("Traceback"):
line_idx += 1
# skip : "Traceback (most recent call last):"
line_idx += 1
while lines[line_idx] != lines[line_idx].lstrip(): while lines[line_idx] != lines[line_idx].lstrip():
error["traceback"].append({ error["traceback"].append({
"location" : lines[line_idx].strip(), "location" : lines[line_idx].strip(),
...@@ -546,7 +549,10 @@ class Workflow(threading.Thread): ...@@ -546,7 +549,10 @@ class Workflow(threading.Thread):
line_idx += 2 line_idx += 2
# Error message # Error message
while line_idx < len(lines) and not lines[line_idx].strip().startswith("##"): while line_idx < len(lines) and not lines[line_idx].strip().startswith("##"):
error["msg"].append( lines[line_idx].strip().split(":", 1)[1][1:] ) try:
error["msg"].append( lines[line_idx].strip().split(":", 1)[1][1:] )
except:
error["msg"].append( lines[line_idx].strip() )
line_idx += 1 line_idx += 1
line_idx -= 1 line_idx -= 1
line_idx += 1 line_idx += 1
......
Supports Markdown
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