diff options
Diffstat (limited to 'urwid/main_loop.py')
| -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): |
