func_timeout/func_timeout/py2_raise.py

6 lines
145 B
Python

# Python2 allows specifying an alternate traceback.
def raise_exception(exception):
raise exception[0] , None , exception[0].__traceback__