summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlain Leufroy <none@none>2017-03-16 10:53:10 +0100
committerAlain Leufroy <none@none>2017-03-16 10:53:10 +0100
commit95e3b328c637367176e53440a4f5cfac6efb0718 (patch)
tree3b95441e740deb580bf94e076ee3d386ae2f40ea
parentfa4ca85f12092cd11a5e118053b4a9dd1bbb058b (diff)
downloadurwid-95e3b328c637367176e53440a4f5cfac6efb0718.tar.gz
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.
-rw-r--r--urwid/raw_display.py4
1 files changed, 1 insertions, 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