How to write exception reraising code that's compatible with both Python 2 and Python 3?
Can you use six
? It exists to solve this very problem.
import six, sys
six.reraise(*sys.exc_info())
See: https://six.readthedocs.io/index.html#six.reraise