bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949)
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context manager body. Previously this check was too permissive, and undid one level of chaining on *all* RuntimeError instances, not just those that wrapped a StopIteration instance.
S
svelankar committed
00c75e9a45ff0366c185e9e8a2e23af5a35481b0
Parent: 6fab78e
Committed by Nick Coghlan <ncoghlan@gmail.com>
on 4/11/2017, 9:11:13 AM