Commit 869ce78b authored by Denis Laxalde's avatar Denis Laxalde
Browse files

Possibly decode result.traceback before sending it to CubicWeb in run_all_tasks()

Under some mysterious circumstances, result.traceback appears to be bytes. So
decode it before trying to fire workflow transition with it as "comment"
value.
parent d087ecbf0878
......@@ -60,7 +60,10 @@ def run_all_tasks(cnx=None):
STATES.SUCCESS: 'finish',
STATES.FAILURE: 'fail',
}[result.state]
wf.fire_transition(transition, result.traceback)
comment = result.traceback
if comment is not None and not isinstance(comment, six.text_type):
comment = comment.decode('utf-8')
wf.fire_transition(transition, comment)
return results
......
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