mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-102799: use exception instance instead of sys.exc_info() (#102885)
This commit is contained in:
parent
c1e71ce56f
commit
44bd3fe570
7 changed files with 16 additions and 17 deletions
|
@ -1481,7 +1481,7 @@ class _Unpickler:
|
|||
value = klass(*args)
|
||||
except TypeError as err:
|
||||
raise TypeError("in constructor for %s: %s" %
|
||||
(klass.__name__, str(err)), sys.exc_info()[2])
|
||||
(klass.__name__, str(err)), err.__traceback__)
|
||||
else:
|
||||
value = klass.__new__(klass)
|
||||
self.append(value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue