Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove redundant assertion
  • Loading branch information
iritkatriel committed Dec 1, 2021
commit 5bf6edda3a0ea1c3f04dc962550b885350f792e1
6 changes: 1 addition & 5 deletions Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,7 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
# Capture now to permit freeing resources: only complication is in the
# unofficial API _format_final_exc_line
self._str = _some_str(exc_value)
if exc_value is not None:
self.__note__ = exc_value.__note__
assert self.__note__ is None or isinstance(self.__note__, str)
else:
self.__note__ = None
self.__note__ = exc_value.__note__ if exc_value else None

if exc_type and issubclass(exc_type, SyntaxError):
# Handle SyntaxError's specially
Expand Down