mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 06:21:48 +03:00
util: raise with traceback in Python 2
Summary: Similar to D23819023 (c96de76ac0
) but works on Python 2, too.
Reviewed By: DurhamG
Differential Revision: D23858273
fbshipit-source-id: b15be07c8657bc8cb37960b631f2b31e4a78892b
This commit is contained in:
parent
f7ea4e2747
commit
2f5752eda5
@ -4357,6 +4357,9 @@ def threaded(func):
|
|||||||
|
|
||||||
variant, value = result
|
variant, value = result
|
||||||
if variant == "err":
|
if variant == "err":
|
||||||
|
tb = getattr(value, "__traceback__", None)
|
||||||
|
if tb is not None:
|
||||||
|
pycompat.raisewithtb(value, tb)
|
||||||
raise value
|
raise value
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
Loading…
Reference in New Issue
Block a user