diff options
| author | Ruurd Moelker <None@rtop.com> | 2014-12-05 15:04:59 +0100 |
|---|---|---|
| committer | Ruurd Moelker <None@rtop.com> | 2014-12-05 15:04:59 +0100 |
| commit | 2a81ec15e73bfb6830b65cc1695621ecdb296462 (patch) | |
| tree | 6a805e27c5e7a48ead6325462accb6a3571e907e /urwid | |
| parent | b851b905cb8c6c46a1757d0ccca2adbd02740ba7 (diff) | |
| download | urwid-2a81ec15e73bfb6830b65cc1695621ecdb296462.tar.gz | |
cleanup screen claim on runtime exception
Diffstat (limited to 'urwid')
| -rwxr-xr-x | urwid/main_loop.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/urwid/main_loop.py b/urwid/main_loop.py index 77022bf..6ada032 100755 --- a/urwid/main_loop.py +++ b/urwid/main_loop.py @@ -372,7 +372,11 @@ class MainLoop(object): finally: self.screen.stop() - self.event_loop.run() + try: + self.event_loop.run() + except Exception as e: + self.screen.stop() # clean up screen control + raise e self.stop() def _update(self, keys, raw): |
