Skip to content

Commit e96e62a

Browse files
committed
Deprecate RERAISED_EXCEPTIONS.
It probably was useful when we supported Jython, but it's not useful anymore.
1 parent 4f3dd96 commit e96e62a

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/robot/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
from .platform import (
9999
PY_VERSION as PY_VERSION,
100100
PYPY as PYPY,
101-
RERAISED_EXCEPTIONS as RERAISED_EXCEPTIONS,
102101
UNIXY as UNIXY,
103102
WINDOWS as WINDOWS,
104103
)
@@ -213,6 +212,7 @@ def is_pathlike(item):
213212
return isinstance(item, PathLike)
214213

215214
deprecated = {
215+
'RERAISED_EXCEPTIONS': (KeyboardInterrupt, SystemExit, MemoryError),
216216
'FALSE_STRINGS': FALSE_STRINGS,
217217
'TRUE_STRINGS': TRUE_STRINGS,
218218
'ET': ET,

src/robot/utils/error.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
from robot.errors import RobotError
2121

22-
from .platform import RERAISED_EXCEPTIONS
23-
2422

2523
EXCLUDE_ROBOT_TRACES = not os.getenv('ROBOT_INTERNAL_TRACES')
2624

@@ -55,7 +53,7 @@ def __init__(self, error=None, full_traceback=True,
5553
exclude_robot_traces=EXCLUDE_ROBOT_TRACES):
5654
if not error:
5755
error = sys.exc_info()[1]
58-
if isinstance(error, RERAISED_EXCEPTIONS):
56+
if isinstance(error, (KeyboardInterrupt, SystemExit, MemoryError)):
5957
raise error
6058
self.error = error
6159
self._full_traceback = full_traceback

src/robot/utils/platform.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
PYPY = 'PyPy' in sys.version
2222
UNIXY = os.sep == '/'
2323
WINDOWS = not UNIXY
24-
RERAISED_EXCEPTIONS = (KeyboardInterrupt, SystemExit, MemoryError)
2524

2625

2726
def isatty(stream):

0 commit comments

Comments
 (0)