diff options
| author | Ian Ward <ian@excess.org> | 2015-01-04 09:18:24 -0500 |
|---|---|---|
| committer | Ian Ward <ian@excess.org> | 2015-01-04 09:18:24 -0500 |
| commit | 0b1d1dbf50bc72d81f4573de2f4749f795f2c0a1 (patch) | |
| tree | 14f9172d2e464cf484b1ea1fe5dbf7d9ca5e73d3 | |
| parent | b851b905cb8c6c46a1757d0ccca2adbd02740ba7 (diff) | |
| download | urwid-fix-error-term-settings.tar.gz | |
fix for terminal settings not reset on error regressionfix-error-term-settings
| -rwxr-xr-x | urwid/main_loop.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/urwid/main_loop.py b/urwid/main_loop.py index 77022bf..6fecaf6 100755 --- a/urwid/main_loop.py +++ b/urwid/main_loop.py @@ -365,15 +365,14 @@ class MainLoop(object): def _run(self): try: - self.start() - except CantUseExternalLoop: try: + self.start() + except CantUseExternalLoop: return self._run_screen_event_loop() - finally: - self.screen.stop() - - self.event_loop.run() - self.stop() + else: + return self.event_loop.run() + finally: + self.screen.stop() def _update(self, keys, raw): """ |
