forked from VimPlug/jedi
Remove _compatibility.reraise
This commit is contained in:
@@ -218,26 +218,6 @@ except NameError:
|
|||||||
unicode = str
|
unicode = str
|
||||||
|
|
||||||
|
|
||||||
# re-raise function
|
|
||||||
if is_py3:
|
|
||||||
def reraise(exception, traceback):
|
|
||||||
raise exception.with_traceback(traceback)
|
|
||||||
else:
|
|
||||||
eval(compile("""
|
|
||||||
def reraise(exception, traceback):
|
|
||||||
raise exception, None, traceback
|
|
||||||
""", 'blub', 'exec'))
|
|
||||||
|
|
||||||
reraise.__doc__ = """
|
|
||||||
Re-raise `exception` with a `traceback` object.
|
|
||||||
|
|
||||||
Usage::
|
|
||||||
|
|
||||||
reraise(Exception, sys.exc_info()[2])
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def use_metaclass(meta, *bases):
|
def use_metaclass(meta, *bases):
|
||||||
""" Create a class with a metaclass. """
|
""" Create a class with a metaclass. """
|
||||||
if not bases:
|
if not bases:
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import functools
|
|||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from jedi._compatibility import reraise
|
|
||||||
|
|
||||||
|
|
||||||
_sep = os.path.sep
|
_sep = os.path.sep
|
||||||
if os.path.altsep is not None:
|
if os.path.altsep is not None:
|
||||||
@@ -75,7 +73,7 @@ def reraise_uncaught(func):
|
|||||||
return func(*args, **kwds)
|
return func(*args, **kwds)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
exc_info = sys.exc_info()
|
exc_info = sys.exc_info()
|
||||||
reraise(UncaughtAttributeError(exc_info[1]), exc_info[2])
|
UncaughtAttributeError(exc_info[1]).with_traceback(exc_info[2])
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user