提交 af17040b authored 作者: Frederic Bastien's avatar Frederic Bastien

Keep the most recent stack trace, not the oldest

上级 fd4bb825
...@@ -87,8 +87,10 @@ def add_tag_trace(thing, user_line=1): ...@@ -87,8 +87,10 @@ def add_tag_trace(thing, user_line=1):
break break
if not rm: if not rm:
break break
# Keep only the most recent stack level.
# The order is from the oldest to the newest
if len(tr) > user_line: if len(tr) > user_line:
tr = tr[:user_line] tr = tr[-user_line:]
thing.tag.trace = tr thing.tag.trace = tr
return thing return thing
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论