This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alonho
Recipients alonho, ncoghlan
Date 2012-06-01.08:09:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Ok, so turns out this was just a stupid bug: we set the __context__ attr only if an exception is raised, but not when an exception has been previously 'cleared'. so the context is filled (by python) with the last exception raised which is the outer one.
deleting the 'if last context is an exception' solved it.

This is how I understood it:
the exception's __context__ is set when it's raised and not in its except clause, meaning there is no way the outer with is mutating our inner exceptions. using pdb I saw the outer exception being explicitly set.
Date User Action Args
2012-06-01 08:09:42alonhosetrecipients: + alonho, ncoghlan
2012-06-01 08:09:42alonhosetmessageid: <>
2012-06-01 08:09:41alonholinkissue14969 messages
2012-06-01 08:09:41alonhocreate