diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2014-01-24 13:07:16 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2014-01-24 13:07:16 (GMT) |
commit | b3c0f4067d992fc2c0d8578e308cc7167dc98f32 (patch) | |
tree | 78f3a89912da885be6780abb8512a0c43b3a5683 /Lib/contextlib.py | |
parent | 8f81c3cf3f76ec7991f3c367926faf07357a465e (diff) | |
parent | add94c9d825dc2d870f6557e1d6510a82d3dba12 (diff) | |
download | cpython-b3c0f4067d992fc2c0d8578e308cc7167dc98f32.zip cpython-b3c0f4067d992fc2c0d8578e308cc7167dc98f32.tar.gz cpython-b3c0f4067d992fc2c0d8578e308cc7167dc98f32.tar.bz2 |
Merge removal of issue 20317 debugging code from 3.3
Diffstat (limited to 'Lib/contextlib.py')
-rw-r--r-- | Lib/contextlib.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/contextlib.py b/Lib/contextlib.py index ca7a79d..82ee955 100644 --- a/Lib/contextlib.py +++ b/Lib/contextlib.py @@ -298,7 +298,7 @@ class ExitStack(object): # we were actually nesting multiple with statements frame_exc = sys.exc_info()[1] def _fix_exception_context(new_exc, old_exc): - # Context isn't what we want, so find the end of the chain + # Context may not be correct, so find the end of the chain while 1: exc_context = new_exc.__context__ if exc_context is old_exc: @@ -306,8 +306,6 @@ class ExitStack(object): return if exc_context is None or exc_context is frame_exc: break - details = id(new_exc), id(old_exc), id(exc_context) - raise Exception(str(details)) new_exc = exc_context # Change the end of the chain to point to the exception # we expect it to reference |