diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-03-31 10:23:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 10:23:02 (GMT) |
commit | 44bd3fe570da9115bec67694404b8da26716a1d7 (patch) | |
tree | f6280db95a581e4363bc6c2dfde592b932f3cd07 /Lib/pickle.py | |
parent | c1e71ce56fdb3eab62ad3190d09130f800e54610 (diff) | |
download | cpython-44bd3fe570da9115bec67694404b8da26716a1d7.zip cpython-44bd3fe570da9115bec67694404b8da26716a1d7.tar.gz cpython-44bd3fe570da9115bec67694404b8da26716a1d7.tar.bz2 |
gh-102799: use exception instance instead of sys.exc_info() (#102885)
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 15fa5f6..fe86f80 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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) |