Skip to content

Commit

Permalink
src/sage/doctest/forker.py: remove old python 2 workaround
Browse files Browse the repository at this point in the history
According to the comment, we can skip clearing this exception nowadays
because we only support python3.
  • Loading branch information
orlitzky committed Oct 16, 2024
1 parent db01308 commit 832c792
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/sage/doctest/forker.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,16 +716,6 @@ def compiler(example):
raise
except BaseException:
exception = sys.exc_info()
# On Python 2, the exception lives in sys.exc_info() as
# long we are in the same stack frame. To ensure that
# sig_occurred() works correctly, we need to clear the
# exception. This is not an issue on Python 3, where the
# exception is cleared as soon as we are outside of the
# "except" clause.
try:
sys.exc_clear()
except AttributeError:
pass # Python 3
finally:
if self.debugger is not None:
self.debugger.set_continue() # ==== Example Finished ====
Expand Down

0 comments on commit 832c792

Please sign in to comment.