summaryrefslogtreecommitdiffstats
path: root/Lib/contextlib.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-09-01 20:27:58 (GMT)
committerCollin Winter <collinw@gmail.com>2007-09-01 20:27:58 (GMT)
commitc59dacdbd84df0c4f121caa48e07933512177cd2 (patch)
tree5e106129a01e055b60b155c8aa074f889ab1adf4 /Lib/contextlib.py
parent1966f1c98f32c482b16f1a9c1a36fc8e0628486b (diff)
downloadcpython-c59dacdbd84df0c4f121caa48e07933512177cd2.zip
cpython-c59dacdbd84df0c4f121caa48e07933512177cd2.tar.gz
cpython-c59dacdbd84df0c4f121caa48e07933512177cd2.tar.bz2
Fix a poorly-translated raise statement in contextlib.
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r--Lib/contextlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index 38ec577..fba4889 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -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):