mirror of
https://github.com/facebook/sapling.git
synced 2024-12-25 05:53:24 +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
|
||||
if variant == "err":
|
||||
tb = getattr(value, "__traceback__", None)
|
||||
if tb is not None:
|
||||
pycompat.raisewithtb(value, tb)
|
||||
raise value
|
||||
|
||||
return value
|
||||
|
Loading…
Reference in New Issue
Block a user