[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

Nick Coghlan report at bugs.python.org
Sun Sep 29 02:13:42 CEST 2013


Nick Coghlan added the comment:

Moving the context fixing into an exception handler may work. Something
like:

    try:
        raise exc[1]
     except BaseException as fix_exc:
        ...
        raise

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19092>
_______________________________________


More information about the Python-bugs-list mailing list