def reraise ( error ) : if hasattr ( error , "_type_" ) : six . reraise ( type ( error ) , error , error . _traceback ) raise error
how to properly use a raise function in python
Re - raises the error that was processed by prepare_for_reraise earlier .
def reraise(error):
    """Re-raises the error that was processed by prepare_for_reraise earlier."""
    if hasattr(error, "_type_"):
        six.reraise(type(error), error, error._traceback)
    raise error