mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Fix a poorly-translated raise statement in contextlib.
This commit is contained in:
parent
1966f1c98f
commit
c59dacdbd8
1 changed files with 2 additions and 1 deletions
|
@ -125,7 +125,8 @@ def nested(*managers):
|
|||
# Don't rely on sys.exc_info() still containing
|
||||
# the right information. Another exception may
|
||||
# have been raised and caught by an exit method
|
||||
raise exc[0](exc[1]).with_traceback(exc[2])
|
||||
# exc[1] already has the __traceback__ attribute populated
|
||||
raise exc[1]
|
||||
|
||||
|
||||
class closing(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue