]> granicus.if.org Git - python/commitdiff
Fix a poorly-translated raise statement in contextlib.
authorCollin Winter <collinw@gmail.com>
Sat, 1 Sep 2007 20:27:58 +0000 (20:27 +0000)
committerCollin Winter <collinw@gmail.com>
Sat, 1 Sep 2007 20:27:58 +0000 (20:27 +0000)
Lib/contextlib.py

index 38ec5775988e5c03cbc79f57c1c3c4d5aac2fba1..fba4889002bdcf8cdf299fac277771ac23799f53 100644 (file)
@@ -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):