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

contextmanagers: Put state restore code into finally block #29

Merged
merged 1 commit into from
Jul 30, 2013

Conversation

vitek
Copy link
Contributor

@vitek vitek commented Jul 30, 2013

fullscreen() contextmanger doesn't restore state when exception occurs:

import blessings

term = blessings.Terminal()
with term.fullscreen():
    raise KeyboardInterrupt

This patch fixes this.

erikrose added a commit that referenced this pull request Jul 30, 2013
contextmanagers: Put state restore code into finally block
@erikrose erikrose merged commit 74e89a5 into erikrose:master Jul 30, 2013
@erikrose
Copy link
Owner

Thanks for the good patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants