提交 c4b2cffc authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix in copy_stack_trace when the old variable had only one trace

上级 091559fe
...@@ -2855,6 +2855,10 @@ def copy_stack_trace(from_var, to_var): ...@@ -2855,6 +2855,10 @@ def copy_stack_trace(from_var, to_var):
# so just store that particular stack trace # so just store that particular stack trace
tr = getattr(from_var.tag, 'trace', []) tr = getattr(from_var.tag, 'trace', [])
if tr and isinstance(tr[0], tuple):
# There was one single stack trace, we encapsulate it in a list
tr = [tr]
# Copy over stack traces to to_var # Copy over stack traces to to_var
if type(to_var) is list: if type(to_var) is list:
# Copy over stack traces from from_var to each variable in # Copy over stack traces from from_var to each variable in
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论