Skip to content
Merged
Show file tree
Hide file tree
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
Apply suggestions from code review
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
  • Loading branch information
perrinjerome and iritkatriel authored Jan 15, 2024
commit 6c6867a4cff331524a6b32218ca51ca7ed7240f4
2 changes: 1 addition & 1 deletion Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ def __getattr__(self, name):
e.broken = True
self.assertEqual(
self.get_report(e),
vanilla + "Ignored exception getting __notes__: ValueError('no __notes__')\n")
vanilla + "Ignored error getting __notes__: ValueError('no __notes__')\n")

def test_exception_with_multiple_notes(self):
for e in [ValueError(42), SyntaxError('bad syntax')]:
Expand Down
2 changes: 1 addition & 1 deletion Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
self.__notes__ = getattr(exc_value, '__notes__', None)
except Exception as e:
self.__notes__ = [
f'Ignored exception getting __notes__: {_safe_string(e, '__notes__', repr)}']
f'Ignored error getting __notes__: {_safe_string(e, '__notes__', repr)}']

self._is_syntax_error = False
self._have_exc_type = exc_type is not None
Expand Down