From: Collin Winter Date: Sat, 1 Sep 2007 20:27:58 +0000 (+0000) Subject: Fix a poorly-translated raise statement in contextlib. X-Git-Tag: v3.0a2~479 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c59dacdbd84df0c4f121caa48e07933512177cd2;p=thirdparty%2FPython%2Fcpython.git Fix a poorly-translated raise statement in contextlib. --- diff --git a/Lib/contextlib.py b/Lib/contextlib.py index 38ec5775988e..fba4889002bd 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):