def get_pickled_exception(exc):
 if isinstance(exc, UnpickleableExceptionWrapper):
  return exc.restore()
 return exc

def get_pickled_exception ( exc ) : if isinstance ( exc , UnpickleableExceptionWrapper ) : return exc . restore ( ) return exc
get original exception from exception pickled using :meth:get_pickleable_exception .