def convert_exception(from_exception, to_exception, *to_args, **to_kw):
    def wrapper(fn):

        def fn_new(*args, **kw):
            try:
                return fn(*args, **kw)
            except from_exception:
                new_exception = to_exception(*to_args, **to_kw)
                traceback = sys.exc_info()[2]
                if PY3:
                    value = new_exception
                else:
                    value = None
                reraise(new_exception, value, traceback)

        fn_new.__doc__ = fn.__doc__
        return fn_new

    return wrapper
Fetch data from OMDB API.
dataset/ETHPy150Open shazow/unstdlib.py/unstdlib/standard/exception_.py/convert_exception--crossover with--dataset/ETHPy150Open iCHAIT/moviemon/moviemon/moviemon.py/omdb