From 95e3b328c637367176e53440a4f5cfac6efb0718 Mon Sep 17 00:00:00 2001 From: Alain Leufroy Date: Thu, 16 Mar 2017 10:53:10 +0100 Subject: fix: raw display should release file descriptors (issue #221) `raw_display.Screen.hook_event_loop` does not fill `self._current_event_loop_handles` with handled file descriptors. So, `raw_display.Screen.hook_event_loop` can not release then. --- urwid/raw_display.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/urwid/raw_display.py b/urwid/raw_display.py index 132b4ff..e48e4b0 100644 --- a/urwid/raw_display.py +++ b/urwid/raw_display.py @@ -392,9 +392,7 @@ class Screen(BaseScreen, RealTerminal): wrapper = lambda: self.parse_input( event_loop, callback, self.get_available_raw_input()) fds = self.get_input_descriptors() - handles = [] - for fd in fds: - event_loop.watch_file(fd, wrapper) + handles = [event_loop.watch_file(fd, wrapper) for fd in fds] self._current_event_loop_handles = handles _input_timeout = None -- cgit v1.2.1