aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/traceback.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-02-07 09:25:06 +0300
committershadchin <shadchin@yandex-team.com>2024-02-07 09:40:03 +0300
commit3139d9ab6df2a7014d19b87582466d17b4f496e2 (patch)
tree7fcb26a72dac212aa26beaaa7cd769fb1e396b5e /contrib/tools/python3/src/Lib/traceback.py
parent4c04a8d1e278e6ca7ff16c11b74b2f16fc144253 (diff)
downloadydb-3139d9ab6df2a7014d19b87582466d17b4f496e2.tar.gz
Update Python 3 to 3.11.8
Diffstat (limited to 'contrib/tools/python3/src/Lib/traceback.py')
-rw-r--r--contrib/tools/python3/src/Lib/traceback.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/tools/python3/src/Lib/traceback.py b/contrib/tools/python3/src/Lib/traceback.py
index ea045e2761..e7026e545c 100644
--- a/contrib/tools/python3/src/Lib/traceback.py
+++ b/contrib/tools/python3/src/Lib/traceback.py
@@ -733,7 +733,11 @@ class TracebackException:
# Capture now to permit freeing resources: only complication is in the
# unofficial API _format_final_exc_line
self._str = _safe_string(exc_value, 'exception')
- self.__notes__ = getattr(exc_value, '__notes__', None)
+ try:
+ self.__notes__ = getattr(exc_value, '__notes__', None)
+ except Exception as e:
+ self.__notes__ = [
+ f'Ignored error getting __notes__: {_safe_string(e, "__notes__", repr)}']
if exc_type and issubclass(exc_type, SyntaxError):
# Handle SyntaxError's specially