Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore handled exception when popping the context #1393



Copy link

@mjpieters mjpieters commented Mar 23, 2015

This is a fix for #1392; the app and request contexts should not report an exception when tearing down after an exception has already been handled in a with statement.

mjpieters added 2 commits Mar 23, 2015
…earing down a context.

When an exception has been handled when using the request / app context in a with statement, `sys.exc_info()` will still contain the exception information even though it has been handled already. The `__exit__` methods pass in `None` for the exception value in that case, which needs to be distinguisable from the default value for the `exc` parameter. Use a dedicated singleton sentinel value instead.
@untitaker untitaker merged commit ecaaa50 into pallets:master Mar 23, 2015
1 check was pending
untitaker added a commit that referenced this issue Mar 23, 2015
Copy link

@untitaker untitaker commented Mar 23, 2015

Excellent, thanks!


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants