]> granicus.if.org Git - python/commit
Fix a problem with @contextmanager not detecting a broken generator
authorPhillip J. Eby <pje@telecommunity.com>
Sat, 25 Mar 2006 00:28:24 +0000 (00:28 +0000)
committerPhillip J. Eby <pje@telecommunity.com>
Sat, 25 Mar 2006 00:28:24 +0000 (00:28 +0000)
commit6edd2586082f62a5ac61af5acab77b63919faa47
tree183890c03fa62ea02b86afbcca1273427d03f72e
parentbee071221419795d707a15286e08424d141a6ca6
Fix a problem with @contextmanager not detecting a broken generator
that yields after a throw().  Make @contextmanager not reraise
exceptions, but return a false value in that case instead.  Add test
cases for both behaviors.
Lib/contextlib.py
Lib/test/test_contextlib.py